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@atlantis-lab/button@audentio/stuff@atomik-ui/box@class101/ui-system@axiomatic/react-components@agnijs/agni-ui@additivsg/ucomponents@adapt-ui/core@egoist/chakra-ui@effable/react@codacy/ui-components@contra-ui/core@alphalets-ui/core@coinjoss-ui/core@alexanderjeurissen/flex@alexanderjeurissen/grid@compiled-system/core@aksara-ui/helpers@aksara-ui/reactstyled-uistinodes-uiui-bagtest-bcc-design-system@basic-ui/material@blockstack/ui@builtbypixel/plasma@carecar-ds/box@caredoc/ui-web@cap-collectif/ui@centrifuge/fabric@braineet/ui@bonobolabs/mds-web-ui@bonobolabs/mds-web-ui-gatsby@bonobolabs/mds-web-ui-reach@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/klee@metrewards/react-components@mygodcorp/baseui@nerdify/styled-system-primitives@mindfulstudio/tenjin-ui@mindfulstudio/tuscany-components@kodiak-ui/core@komfy-social/reflexbox@ke.wallet/provider-ke-wallet-ui@ratatoskr-ui/components@qonsoll/react-design@qualifyze/design-system@react-yuki/ui@polymathnetwork/launchpad-ui
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