@atlaskit/eslint-plugin-ui-styling-standard 0.16.3 → 0.16.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/constellation/atlaskit-theme/usage.mdx +74 -55
  3. package/constellation/convert-props-syntax/usage.mdx +29 -24
  4. package/constellation/enforce-style-prop/usage.mdx +32 -26
  5. package/constellation/local-cx-xcss/usage.mdx +27 -15
  6. package/constellation/no-array-arguments/usage.mdx +12 -9
  7. package/constellation/no-classname-prop/usage.mdx +13 -5
  8. package/constellation/no-container-queries/usage.mdx +65 -16
  9. package/constellation/no-dynamic-styles/usage.mdx +16 -11
  10. package/constellation/no-exported-styles/usage.mdx +25 -30
  11. package/constellation/no-global-styles/usage.mdx +4 -3
  12. package/constellation/no-important-styles/usage.mdx +5 -3
  13. package/constellation/no-imported-style-values/usage.mdx +30 -27
  14. package/constellation/no-nested-selectors/usage.mdx +51 -18
  15. package/constellation/no-styled/usage.mdx +17 -14
  16. package/constellation/no-unsafe-selectors/usage.mdx +184 -58
  17. package/constellation/no-unsafe-values/usage.mdx +150 -48
  18. package/constellation/use-compiled/usage.mdx +8 -8
  19. package/package.json +1 -1
  20. package/src/rules/atlaskit-theme/README.md +74 -55
  21. package/src/rules/convert-props-syntax/README.md +29 -24
  22. package/src/rules/enforce-style-prop/README.md +32 -26
  23. package/src/rules/local-cx-xcss/README.md +27 -15
  24. package/src/rules/no-array-arguments/README.md +12 -9
  25. package/src/rules/no-classname-prop/README.md +13 -5
  26. package/src/rules/no-container-queries/README.md +65 -16
  27. package/src/rules/no-dynamic-styles/README.md +16 -11
  28. package/src/rules/no-exported-styles/README.md +25 -30
  29. package/src/rules/no-global-styles/README.md +4 -3
  30. package/src/rules/no-important-styles/README.md +5 -3
  31. package/src/rules/no-imported-style-values/README.md +30 -27
  32. package/src/rules/no-nested-selectors/README.md +51 -18
  33. package/src/rules/no-styled/README.md +17 -14
  34. package/src/rules/no-unsafe-selectors/README.md +184 -58
  35. package/src/rules/no-unsafe-values/README.md +150 -48
  36. package/src/rules/use-compiled/README.md +8 -8
@@ -1,42 +1,92 @@
1
- This rule prevents the usage of the `@container` query in style declarations.
1
+ Blocks `@container` at-rules
2
+ ([container queries](https://developer.mozilla.org/en-US/docs/Web/CSS/@container)), which are
3
+ unsafe.
2
4
 
3
- Container queries break the rules of scope and aren’t guaranteed to be deterministic or type safe
4
- and isn’t fully supported across our frontend tech stacks.
5
+ Container queries are unsafe because they:
5
6
 
6
- We suggest you explore the use alternatives such as client JavaScript-based APIs or media queries.
7
+ - break the rules of scope
8
+ - aren't deterministic
9
+ - aren't type-safe
10
+ - aren't fully supported across our frontend tech stacks
11
+
12
+ Use [media queries](https://atlassian.design/components/primitives/responsive/breakpoints/examples),
13
+ a
14
+ [WidthObserver](https://atlaskit.atlassian.com/packages/design-system/width-detector/docs/migration-guide),
15
+ or a custom [ResizeObserver](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver)
16
+ instead.
7
17
 
8
18
  ## Examples
9
19
 
10
20
  ### Incorrect
11
21
 
12
- ```js
22
+ ```tsx
13
23
  import { css } from '@compiled/react';
24
+ import { token } from '@atlaskit/tokens';
14
25
 
15
- const styles = css({
26
+ const headingStyles = css({
16
27
  '@container (width > 400px)': {
17
- h2: {
18
- fontSize: '1.5rem',
19
- },
28
+ font: token('font.heading.large'),
20
29
  },
21
30
  });
22
31
  ```
23
32
 
24
33
  ### Correct
25
34
 
26
- ```js
35
+ #### Media queries
36
+
37
+ ```tsx
27
38
  import { css } from '@compiled/react';
39
+ import { media } from '@atlaskit/primitives/responsive';
40
+ import { token } from '@atlaskit/tokens';
41
+
42
+ const headingStyles = css({
43
+ [media.above.sm]: {
44
+ font: token('font.heading.large'),
45
+ },
46
+ });
47
+ ```
48
+
49
+ #### WidthObserver
50
+
51
+ ```tsx
52
+ import { useState } from 'react';
53
+ import { css, cssMap } from '@compiled/react';
54
+ import throttle from 'lodash/throttle';
55
+ import { WidthObserver } from '@atlaskit/width-detector';
56
+ import { token } from '@atlaskit/tokens';
28
57
 
29
58
  const containerStyles = css({
30
- display: 'flex',
31
- flexDirection: 'column',
59
+ // Required for the `WidthObserver`, which is absolutely positioned
60
+ position: 'relative',
32
61
  });
62
+
63
+ const headingStyles = cssMap({
64
+ small: {
65
+ font: token('font.heading.small'),
66
+ },
67
+ large: {
68
+ font: token('font.heading.large'),
69
+ },
70
+ });
71
+
72
+ const ResponsiveH2 = () => {
73
+ const [width = 0, setWidth] = useState<number | undefined>(undefined);
74
+ const throttledSetWidth = throttle(setWidth, 50);
75
+
76
+ return (
77
+ <div css={containerStyles}>
78
+ <WidthObserver setWidth={throttledSetWidth} />
79
+ <h2 css={width < 400 ? headingStyles.small : headingStyles.large}>Title</h2>
80
+ </div>
81
+ );
82
+ };
33
83
  ```
34
84
 
35
85
  ## Options
36
86
 
37
- ### importSources
87
+ ### `importSources: string[]`
38
88
 
39
- By default, this rule will check `css` usages from:
89
+ By default, this rule will check styles using:
40
90
 
41
91
  - `@atlaskit/css`
42
92
  - `@atlaskit/primitives`
@@ -46,5 +96,4 @@ By default, this rule will check `css` usages from:
46
96
  - `@emotion/styled`
47
97
  - `styled-components`
48
98
 
49
- To change this list of libraries, you can define a custom set of `importSources`, which accepts an
50
- array of package names (strings).
99
+ Override this list with the `importSources` option, which accepts an array of package names.
@@ -1,10 +1,10 @@
1
- This rule prevents the use of dynamic styles (function expressions) in style declarations.
1
+ Blocks dynamic styles (function expressions) in style declarations.
2
2
 
3
3
  This ensures that style declarations:
4
4
 
5
5
  - are statically analyzable
6
6
  - can be efficiently extracted into atomic CSS
7
- - are more readable, deterministic, and thus easier to maintain
7
+ - are more readable and deterministic, thus easier to maintain
8
8
 
9
9
  ## Examples
10
10
 
@@ -29,14 +29,20 @@ const Component = styled.div<{ width: number }>({
29
29
  ```tsx
30
30
  import styled from 'styled-components';
31
31
 
32
- const Container = styled.div<hasPadding>({
32
+ const Container = styled.div<{ hasPadding: boolean }>({
33
33
  padding: ({ hasPadding }) => (hasPadding ? token('space.100', '8px') : token('space.0', '0px')),
34
34
  });
35
35
  ```
36
36
 
37
37
  ### Correct
38
38
 
39
- **Flags**
39
+ Define all styles statically, and dynamically apply them using the `css` prop. Use the `style` prop
40
+ for values that are only known at runtime.
41
+
42
+ For further guidance, consult our
43
+ [migration guide](https://atlassian.design/components/eslint-plugin-ui-styling-standard/migration-guide).
44
+
45
+ #### Flags
40
46
 
41
47
  If you have a style that is on/off depending on a prop, use the `css` prop to conditionally apply
42
48
  it.
@@ -52,7 +58,7 @@ const Container = ({ hasPadding = false }: { hasPadding?: boolean }) => {
52
58
  };
53
59
  ```
54
60
 
55
- **Variants**
61
+ #### Variants
56
62
 
57
63
  If you have variants which are known ahead of time, use `cssMap` to define them and the `css` prop
58
64
  to conditionally apply it.
@@ -77,7 +83,7 @@ const Wrapper = ({ appearance = 'primary' }: { appearance?: 'primary' | 'error'
77
83
  );
78
84
  ```
79
85
 
80
- **Dynamic values**
86
+ #### Dynamic values
81
87
 
82
88
  If you have styles which are truly dynamic, use the `style` prop.
83
89
 
@@ -95,7 +101,7 @@ const Component = ({ width }: { width: number }) => {
95
101
  import { css } from '@compiled/react';
96
102
 
97
103
  const containerStyles = css({
98
- '::before': {
104
+ '&::before': {
99
105
  width: 'var(--ak-example-width)',
100
106
  },
101
107
  });
@@ -107,9 +113,9 @@ function Example({ width }: { width: number }) {
107
113
 
108
114
  ## Options
109
115
 
110
- ### importSources
116
+ ### `importSources: string[]`
111
117
 
112
- By default, this rule will check usages from:
118
+ By default, this rule will check styles using:
113
119
 
114
120
  - `@atlaskit/css`
115
121
  - `@atlaskit/primitives`
@@ -119,5 +125,4 @@ By default, this rule will check usages from:
119
125
  - `@emotion/styled`
120
126
  - `styled-components`
121
127
 
122
- To change this list of libraries, you can define a custom set of `importSources`, which accepts an
123
- array of package names (strings).
128
+ Override this list with the `importSources` option, which accepts an array of package names.
@@ -1,14 +1,18 @@
1
- This rule disallows exports of `css`, `cssMap`, `keyframes`, `styled`, `xcss` styles.
1
+ Blocks exports of `css`, `cssMap`, `keyframes`, `styled`, `xcss` styles, which are unsafe.
2
2
 
3
- Exporting style declarations from these libraries may result in unexpected errors when imported,
4
- because its value will be null at runtime. Additionally, co-locating style definitions with their
5
- usage is considered best practice in order to improve code readability and build performance.
3
+ Use alongside `no-imported-style-values` which blocks consumption of imported styles.
4
+
5
+ Compiled style declarations are null at runtime, so using imported styles will cause unexpected
6
+ errors.
7
+
8
+ Co-locate style definitions with their usage instead. This will also improve code readability,
9
+ maintainability and build performance.
6
10
 
7
11
  ## Examples
8
12
 
9
13
  ### Incorrect
10
14
 
11
- ```js
15
+ ```tsx
12
16
  import { css } from '@compiled/react';
13
17
 
14
18
  export const styles = css({});
@@ -16,7 +20,7 @@ export const styles = css({});
16
20
  export default css({});
17
21
  ```
18
22
 
19
- ```js
23
+ ```tsx
20
24
  import { keyframes } from '@compiled/react';
21
25
 
22
26
  export const animation = keyframes({});
@@ -24,21 +28,12 @@ export const animation = keyframes({});
24
28
  export default keyframes({});
25
29
  ```
26
30
 
27
- Avoid exporting any style-like objects or values for consumption as well as these will violate our
28
- `no-imported-style-values` rule which blocks consumption of imported styles.
29
-
30
- ```js
31
- export default {
32
- color: 'red',
33
- margin: '0px',
34
- };
35
- ```
36
-
37
- ```js
31
+ ```tsx
38
32
  import { css } from '@compiled/react';
33
+ import { token } from '@atlaskit/tokens';
39
34
 
40
- const color = css({
41
- /* */
35
+ const colorStyles = css({
36
+ color: token('color.text'),
42
37
  });
43
38
 
44
39
  const styles = {
@@ -54,29 +49,30 @@ export default styles.primary.text.color;
54
49
 
55
50
  ### Correct
56
51
 
57
- Co-locate your styles next to your components to improve code readability, linting, and build
58
- performance.
52
+ Co-locate styles with components to improve code readability, linting, and build performance.
59
53
 
60
- ```js
54
+ ```tsx
61
55
  import { css } from '@compiled/react';
62
56
 
63
57
  const styles = css({});
64
- export const Component = ({ children }) => <div css={styles}>{children}></div>;
58
+
59
+ export const Component = () => <div css={styles} />;
65
60
  ```
66
61
 
67
- ```js
68
- import { keyframes } from '@compiled/react';
62
+ ```tsx
63
+ import { css, keyframes } from '@compiled/react';
69
64
 
70
65
  const animation = keyframes({});
71
66
  const styles = css({ animate: `${animation} 1s ease-in` });
72
- export const Component = ({ children }) => <div css={styles}>{children}></div>;
67
+
68
+ export const Component = () => <div css={styles} />;
73
69
  ```
74
70
 
75
71
  ## Options
76
72
 
77
- ### importSources
73
+ ### `importSources: string[]`
78
74
 
79
- By default, this rule will check `css` usages from:
75
+ By default, this rule will check styles using:
80
76
 
81
77
  - `@atlaskit/css`
82
78
  - `@atlaskit/primitives`
@@ -86,5 +82,4 @@ By default, this rule will check `css` usages from:
86
82
  - `@emotion/styled`
87
83
  - `styled-components`
88
84
 
89
- To change this list of libraries, you can define a custom set of `importSources`, which accepts an
90
- array of package names (strings).
85
+ Override this list with the `importSources` option, which accepts an array of package names.
@@ -1,7 +1,8 @@
1
- This rule prevents global styles through CSS-in-JS or CSS module imports.
1
+ Blocks global styles through CSS-in-JS and CSS module imports.
2
2
 
3
- Requiring local definition of styles helps to ensure that style dependencies are statically
4
- resolvable.
3
+ Use local styles so that style dependencies are statically resolvable.
4
+
5
+ The only global styling that should be used is `@atlaskit/css-reset`.
5
6
 
6
7
  ## Examples
7
8
 
@@ -1,4 +1,4 @@
1
- This rule prevents the usage of the `!important` flag in style declarations.
1
+ Blocks the `!important` flag in style declarations.
2
2
 
3
3
  Properly composed styles will never need an `!important` flag. It is used to override specificity
4
4
  when working across different scopes, and the UI Styling Standard enforces styles with minimal
@@ -12,9 +12,10 @@ The use of `!important` is a code smell and greatly impacts readability and dete
12
12
 
13
13
  ```js
14
14
  import { css } from '@compiled/react';
15
+ import { token } from '@atlaskit/tokens';
15
16
 
16
17
  const styles = css({
17
- color: 'red!important',
18
+ color: `${token('color.text.danger')}!important`,
18
19
  });
19
20
  ```
20
21
 
@@ -22,8 +23,9 @@ const styles = css({
22
23
 
23
24
  ```js
24
25
  import { css } from '@compiled/react';
26
+ import { token } from '@atlaskit/tokens';
25
27
 
26
28
  const styles = css({
27
- color: 'red',
29
+ color: token('color.text.danger'),
28
30
  });
29
31
  ```
@@ -1,29 +1,31 @@
1
- This rule disallows using imported style values in `css`, `cssMap`, `styled`, `keyframes` and `xcss`
2
- calls.
1
+ Blocks imported style values in `css`, `cssMap`, `styled`, `keyframes` and `xcss` calls.
3
2
 
4
- Importing style values may result in unexpected errors when used in these APIs, because its value
5
- will be null at runtime when using `@compiled/react`. Additionally, co-locating style definitions
6
- with their usage is considered best practice in order to improve code readability and build
7
- performance.
3
+ Use alongside `no-exported-styles` which blocks exporting styles.
4
+
5
+ Compiled style declarations are null at runtime, so using imported styles will cause unexpected
6
+ errors.
7
+
8
+ Co-locate style definitions with their usage instead. This will also improve code readability and
9
+ build performance.
8
10
 
9
11
  ## Examples
10
12
 
11
13
  ### Incorrect
12
14
 
13
- ```js
15
+ ```tsx
14
16
  import { css } from '@compiled/react';
15
- import { colors, getColor } from '@mui/theme';
17
+ import { colors, getColor } from '../shared';
16
18
 
17
19
  const styles = css({
18
- [colorKey]: getColor('red'),
19
- background: colors['red'],
20
+ color: getColor('red'),
21
+ backgroundColor: colors['red'],
20
22
  });
21
23
  ```
22
24
 
23
- ```js
25
+ ```tsx
24
26
  import { css } from '@compiled/react';
25
- import { buttonStyles, cssShared, HEIGHT, colorKey } from '../shared';
26
27
  import { ff } from '@atlaskit/ff';
28
+ import { buttonStyles, cssShared, HEIGHT, colorKey } from '../shared';
27
29
 
28
30
  const sharedObject = { padding: 0 };
29
31
 
@@ -37,47 +39,49 @@ const styles = css({
37
39
 
38
40
  Importing styles to use in style composition is not allowed.
39
41
 
40
- ```js
42
+ ```tsx
41
43
  import { css } from '@compiled/react';
44
+ import { token } from '@atlaskit/tokens';
42
45
  import { buttonStyles } from '../shared';
43
46
 
44
47
  const styles = css({
45
- color: 'red',
48
+ color: token('color.text'),
46
49
  });
47
50
 
48
- export default () => <div css={[styles, buttonStyles]} />;
51
+ const Component = () => <div css={[styles, buttonStyles]} />;
49
52
  ```
50
53
 
51
54
  Importing styles to pass to the style prop is also not allowed.
52
55
 
53
- ```js
56
+ ```tsx
54
57
  import { importedWidth } from '../shared';
55
58
 
56
- export default () => <div style={{ width: importedWidth }} />;
59
+ const Component = () => <div style={{ width: importedWidth }} />;
57
60
  ```
58
61
 
59
62
  ### Correct
60
63
 
61
- Co-locate your styles next to your components to improve code readability, linting, and build
62
- performance.
64
+ Co-locate styles with components to improve code readability, linting, and build performance.
63
65
 
64
- ```js
66
+ ```tsx
65
67
  import { css } from '@compiled/react';
66
68
  import { token } from '@atlaskit/tokens';
67
69
 
68
70
  const styles = css({
69
- color: 'red',
71
+ color: token('color.text'),
70
72
  padding: token('space.150'),
71
73
  });
72
- export const Component = ({ children }) => <div css={styles}>{children}></div>;
74
+
75
+ const Component = () => <div css={styles} />;
73
76
  ```
74
77
 
75
- ```js
78
+ ```tsx
76
79
  import { keyframes } from '@compiled/react';
77
80
 
78
81
  const animation = keyframes({});
79
82
  const styles = css({ animate: `${animation} 1s ease-in` });
80
- export const Component = ({ children }) => <div css={styles}>{children}></div>;
83
+
84
+ const Component = () => <div css={styles} />;
81
85
  ```
82
86
 
83
87
  ## Options
@@ -138,7 +142,7 @@ Default imports are not currently supported.
138
142
 
139
143
  ### `importSources: string[]`
140
144
 
141
- By default, this rule will check `css` usages from:
145
+ By default, this rule will check styles using:
142
146
 
143
147
  - `@atlaskit/css`
144
148
  - `@atlaskit/primitives`
@@ -148,5 +152,4 @@ By default, this rule will check `css` usages from:
148
152
  - `@emotion/styled`
149
153
  - `styled-components`
150
154
 
151
- To change this list of libraries, you can define a custom set of `importSources`, which accepts an
152
- array of package names (strings).
155
+ Override this list with the `importSources` option, which accepts an array of package names.
@@ -1,52 +1,86 @@
1
- This rule prevents the usage of the nested selectors in style declarations. Avoid setting styles for
2
- any child elements or elements that require context from other elements.
1
+ Blocks nested selectors in style declarations.
2
+
3
+ Use styles which do not require context from other elements.
3
4
 
4
5
  ## Examples
5
6
 
6
7
  ### Incorrect
7
8
 
8
- ```js
9
+ ```tsx
9
10
  import { css } from '@compiled/react';
11
+ import { token } from '@atlaskit/tokens';
12
+
10
13
  const styles = css({
11
14
  h2: {
12
- fontSize: '1.5rem',
15
+ font: token('font.heading.large'),
13
16
  },
14
17
  });
18
+
19
+ const Component = () => (
20
+ <div css={styles}>
21
+ <h2>Heading</h2>
22
+ </div>
23
+ );
15
24
  ```
16
25
 
17
- ```js
26
+ ```tsx
18
27
  import { styled } from '@compiled/react';
19
- const Component = styled.div({
20
- '*': {
21
- padding: 0,
28
+ import { token } from '@atlaskit/tokens';
29
+
30
+ const Table = styled.table({
31
+ border: `1px solid ${token('color.border')}`,
32
+ td: {
33
+ padding: token('space.100'),
22
34
  },
23
35
  });
24
36
  ```
25
37
 
26
- ```js
38
+ ```tsx
27
39
  import { styled } from '@compiled/react';
40
+ import { token } from '@atlaskit/tokens';
41
+
28
42
  const Component = styled.div({
29
43
  '.myclass': {
30
- padding: 0,
44
+ padding: token('space.100'),
31
45
  },
32
46
  });
33
47
  ```
34
48
 
35
49
  ### Correct
36
50
 
37
- ```js
51
+ ```tsx
38
52
  import { css } from '@compiled/react';
39
- const styles = css({
40
- display: 'flex',
41
- flexDirection: 'column',
53
+ import { token } from '@atlaskit/tokens';
54
+
55
+ const headingStyles = css({
56
+ font: token('font.heading.large'),
57
+ });
58
+
59
+ const Component = () => (
60
+ <div>
61
+ <h2 css={headingStyles}>Heading</h2>
62
+ </div>
63
+ );
64
+ ```
65
+
66
+ ```tsx
67
+ import { css } from '@compiled/react';
68
+ import { token } from '@atlaskit/tokens';
69
+
70
+ const tableStyles = css({
71
+ border: `1px solid ${token('color.border')}`,
72
+ });
73
+
74
+ const tdStyles = css({
75
+ padding: token('space.100'),
42
76
  });
43
77
  ```
44
78
 
45
79
  ## Options
46
80
 
47
- ### importSources
81
+ ### `importSources: string[]`
48
82
 
49
- By default, this rule will check `css` usages from:
83
+ By default, this rule will check styles using:
50
84
 
51
85
  - `@atlaskit/css`
52
86
  - `@atlaskit/primitives`
@@ -56,5 +90,4 @@ By default, this rule will check `css` usages from:
56
90
  - `@emotion/styled`
57
91
  - `styled-components`
58
92
 
59
- To change this list of libraries, you can define a custom set of `importSources`, which accepts an
60
- array of package names (strings).
93
+ Override this list with the `importSources` option, which accepts an array of package names.
@@ -1,6 +1,13 @@
1
- This rule prevents usage of `styled` imports'.
1
+ Blocks the `styled` API, which creates unnecessary indirection.
2
2
 
3
- Avoid usages of styled, eg. `styled.div`, `styled('div')`, `styled(Component)`, etc.
3
+ This indirection:
4
+
5
+ - obfuscates which tag is being rendered
6
+ - adds linting complexity
7
+ - promotes exported styles
8
+ - can complicate refactoring
9
+
10
+ Use the `css` API instead. It has better performance and clarity.
4
11
 
5
12
  ## Examples
6
13
 
@@ -49,8 +56,9 @@ export default styled.div.attrs((props) => ({ 'data-testid': props.testId }))`
49
56
 
50
57
  ```tsx
51
58
  import { css, jsx } from '@emotion/react';
59
+ import { token } from '@atlaskit/tokens';
52
60
 
53
- const styles = css({ color: 'red' });
61
+ const styles = css({ color: token('color.text.subtlest') });
54
62
 
55
63
  const Component = ({ children }) => {
56
64
  return <div css={styles}>{children}</div>;
@@ -58,7 +66,6 @@ const Component = ({ children }) => {
58
66
  ```
59
67
 
60
68
  ```tsx
61
- // Using Primitives
62
69
  import { Box, xcss } from '@atlaskit/primitives';
63
70
 
64
71
  const styles = xcss({
@@ -72,16 +79,12 @@ const Component = ({ children }) => {
72
79
 
73
80
  ## FAQ
74
81
 
75
- ### Why avoid using `styled` imports?
82
+ ### How will I extend like `styled(Button)`?
76
83
 
77
- Using `styled` imports impacts file readability, has TypeScript implications, adds linting
78
- complexity, promotes exported styles, and potential refactoring efforts. Using `css()` with the
79
- `<div css={…}>` syntax is more performant and clear.
84
+ Don't modify the styles of components you don't own, unless they provide an explicit bounded
85
+ interface for doing so — such as the `xcss` prop.
80
86
 
81
- ### How will I extend like `styled(Button)`?
87
+ Use props (excluding `className` which is prohibited) to modify component styles instead.
82
88
 
83
- Primarily, we would suggest you don't extend styles of a component you don't own unless they have an
84
- explicit bounded interface for you to customize against. The Atlassian Design System for example has
85
- removed `styled(Button)` interactivity in our latest variants because they are unsafe for us to
86
- evolve the system with. Instead, make use of reusable component patterns to pass props around which
87
- impact the styles of that component.
89
+ The Atlassian Design System, for example, no longer supports `styled(Button)` because it is unsafe
90
+ for us to evolve the system with.