5.1.5 • Published 6 years ago

@styled-system/should-forward-prop v5.1.5

Weekly downloads
183,937
License
MIT
Repository
-
Last release
6 years ago

@styled-system/should-forward-prop

Utility for filtering Styled System props with Emotion's shouldForwardProp option

npm i @styled-system/should-forward-prop
import styled from '@emotion/styled'
import {
  space,
  color,
  typography
} from 'styled-system'
import shouldForwardProp from '@styled-system/should-forward-prop'

const Box = styled('div', { shouldForwardProp })(
  space,
  color,
  typography
)

Custom Props

To exclude other custom props not included in Styled System, use the createShouldForwardProp utility.

import styled from '@emotion/styled'
import { space, color } from 'styled-system'
import { createShouldForwardProp, props } from '@styled-system/should-forward-prop'

const shouldForwardProp = createShouldForwardProp([
  ...props,
  'd',
  'x'
])

const Box = styled('div', {
  shouldForwardProp
})(props => ({
  display: props.d,
  fontWeight: props.x ? 'bold' : null,
}),
  space,
  color
)

MIT License

zewide@3wirebuild/styled-system@cocoon-ui/box@cocoon-ui/core@linktr.ee/ui-link-kit@waves.exchange/waves-signer@komfy/reflexbox@galley-eng/pricing-calculatormy-test-vimal-componentsvtest-cmp@gassan/gassan-uifreemium-ui-trial@pomona/goods-coreicomera-react-library@cloudie/dropletssui-gatsby@lotter-system/core@coreym/benchmark@fxtrot/edge@testing-ui/core@everything-registry/sub-chunk-878superlib-reactventura-uilayout-kit-reacthybrid-componentsma-hab-test-design-system@waves/storage-provider@waves.exchange/storage-provider@twilio-paste/styling-library@ultron.foundation/uikit@tillen/fresco@theme-ui/components@vashafarisi/react@veriphi/veto-ui@yonyangtangtang/uikit@zalastax/nolb-_sty@tedconf/monterey@zilt/forge-uiantd-styledaresswapcaresswapcuikitanton-ui@egoist/chakra-ui@effable/reactstyled-uistinodes-uiui-bagtest-bcc-design-system@laito/box@laito/image@laito/text@lidofinance/styled-system@locus.sh/neo@locus.sh/neo-ui-core@locustest/neo-ui-core@looker/design-tokens@lote-design-system/core@lidofinance/lido-ui@liinkiing/kleeminerva-uiorcs-design-systemreflexboxreact-flex-primitivereact-grid-primitivepouncejsrebassedproposify-design-systemreact-responsive-videoreact-primitives-boxsharply-kitskara-react@ntragas/pouncejstest@obigtech/ui@obigtech/ui-core@onrecess/playground@oplog/express@eyeem-ui/atoms@hygraph/baukasten@gatsbyjs/gatsby-theme-website@gitq/gitq-icons@gitq/icons@envio-ui/helpers@envio-ui/react@ethers-react/ui@evilfactory/anggun@evilfactory/anggun-core@hitagi/core@hitagi/dota@iguanadex/uikit@pingux/astro@polymathnetwork/launchpad-ui@play4them/design-system@play4them/fresco@plasma-ui/core@plexswap/ui-plexgatsby-theme-gatsbyjs-website@stacks/ui@stacks/ui-core@syvita/ui@syvita/ui-core
5.1.5

6 years ago

5.1.4

6 years ago

5.1.2

6 years ago

5.1.1

6 years ago

5.1.0

6 years ago

5.0.23

6 years ago

5.0.21

6 years ago

5.0.20

6 years ago

5.0.18

6 years ago

5.0.16

6 years ago

5.0.15

6 years ago

5.0.14

6 years ago

5.0.12

6 years ago

5.0.10

6 years ago

5.0.7

6 years ago

5.0.6

6 years ago

5.0.5

6 years ago

5.0.4

6 years ago

5.0.3

6 years ago

5.0.2

6 years ago

5.0.1

6 years ago

5.0.0

6 years ago

5.0.0-12

6 years ago

5.0.0-11

6 years ago

1.0.0

7 years ago