@s-ui/react-atom-action-button

1.11.0 • Public • Published

AtomActionButton

SUI Atom ActionButton

Installation

$ npm install @s-ui/react-atom-action-button

Usage

Basic usage

import AtomActionButton from '@s-ui/react-atom-action-button'

const Icon = () => {
  return (
    <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m6.3506 6.3506 2.649 2.649h-6v-6l1.938 1.938c1.842-1.849 4.347-2.938 7.062-2.938 5.515 0 10 4.486 10 10h-2c0-4.411-3.588-8-8-8-2.172 0-4.176.872-5.649 2.351zm11.2988 11.2988-2.649-2.649h6v6l-1.938-1.939c-1.842 1.85-4.347 2.939-7.062 2.939-5.515 0-10-4.486-10-10h2c0 4.411 3.588 8 8 8 2.172 0 4.176-.872 5.649-2.351z" /></svg>
  )
}

return (<div>
  <AtomActionButton icon={Icon}>Normal</AtomActionButton>
  <AtomActionButton icon={Icon} focused>Focused</AtomActionButton>
  <AtomActionButton icon={Icon} size='large' disabled>Disabled, Large</AtomActionButton>
</div>)

Import package and use the component

import AtomActionButton from '@s-ui/react-atom-action-button'

const Icon = () => {
  return (
    <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m6.3506 6.3506 2.649 2.649h-6v-6l1.938 1.938c1.842-1.849 4.347-2.938 7.062-2.938 5.515 0 10 4.486 10 10h-2c0-4.411-3.588-8-8-8-2.172 0-4.176.872-5.649 2.351zm11.2988 11.2988-2.649-2.649h6v6l-1.938-1.939c-1.842 1.85-4.347 2.939-7.062 2.939-5.515 0-10-4.486-10-10h2c0 4.411 3.588 8 8 8 2.172 0 4.176-.872 5.649-2.351z" /></svg>
  )
}

return (<AtomActionButton icon={Icon} />)

Import the styles (Sass)

@import '~@s-ui/theme/lib/index';
// @import 'your theme';
@import '~@s-ui/react-atom-action-button/lib/index';

Find full description and more examples in the demo page.

/@s-ui/react-atom-action-button/

    Package Sidebar

    Install

    npm i @s-ui/react-atom-action-button

    Weekly Downloads

    1,510

    Version

    1.11.0

    License

    MIT

    Unpacked Size

    13.7 kB

    Total Files

    9

    Last publish

    Collaborators

    • thomas.page.ext
    • victoria.pasichnyk.ext
    • daniel.perez.ext
    • albert.peiro
    • frandelacasa-adevinta
    • mariapaula.forero.ext
    • hpintos_adevinta
    • sziauberyte
    • victor.perez.adevinta
    • oscar-raig-adevinta
    • carlos.gonzalezl
    • carolina.mallo.ext
    • david.nieto
    • ferran.simon
    • xavi_conejo
    • sergi.quintela
    • jamile.radloff
    • xavi_ballestar
    • luz_adv
    • ignacio.rodriguez
    • carlosvillu-adevinta
    • diegomr
    • arturo.vicente
    • adria.velardos
    • emiliovz
    • dann41
    • ruben-martin
    • pol.valls
    • cristina.rodriguez.duque
    • sergio.escano
    • marc.benito
    • azahara
    • patricio.sartore
    • giovanny.sayas.ext
    • david.cuadrado.ext
    • alex.castells
    • beatrizip
    • pablo.rey-adevinta
    • sergiocollado
    • mango.sanchezredondo
    • cristhianb
    • alisa_bayanova
    • davidmartin2108
    • ferrangbtw
    • estefania_garcia
    • belen.santos
    • alfredo.arronte
    • joanleon-adv
    • giodelabarrera.adevinta
    • luis-garrido
    • aitor.rodriguez
    • jordi.munoz
    • oscar_ramirez
    • ignacio_navarro
    • a.ferrer
    • gfabregoadv
    • izeller
    • salvador.juan
    • oriol.egea
    • ivanmlaborda
    • alejandro.ferrante
    • pa.chruscinski.ext
    • isabelgomez87
    • jenifer.lopez
    • daniela.aguilera
    • pablogs
    • javier.miguel
    • oscar.gomez
    • marian.lucaci
    • alverd004
    • oriol.puig
    • nacho_torrella
    • xavi.murcia
    • chloe.leteinturier
    • javiauso
    • alfredo.zimperz
    • francisco.ruiz.lloret
    • fermin.adevinta
    • andresadv
    • schibstedspain