1 | import React, { ReactNode } from 'react';
|
2 | import Lozenge from '@kalamazoo/lozenge';
|
3 | import { md, Example, Props } from '@kalamazoo/docs';
|
4 |
|
5 | const Deprecated = ({ children }: { children: ReactNode }) => (
|
6 | <h2>
|
7 | {children}{' '}
|
8 | <Lozenge appearance="removed" isBold>
|
9 | deprecated
|
10 | </Lozenge>
|
11 | </h2>
|
12 | );
|
13 |
|
14 | export default md`
|
15 | Here you'll find API's that are no longer supported.
|
16 | Please don't use them.
|
17 |
|
18 | ${(<Deprecated>AtlaskitThemeProvider</Deprecated>)}
|
19 |
|
20 | Theme provider is a wrapper component that accepts a 'mode'. This mode is passed down to styled components below it, using the styled components library theme provider, while also providing some defaults.
|
21 |
|
22 | Native Atlaskit components are set up to have both a 'light' mode and a 'dark' mode, and will respond to this, defaulting to the 'light' mode if no theme is provided.
|
23 |
|
24 | The AtlaskitThemeProvider should wrap your entire app, to ensure all components are set to the same theme. Mixing dark and light moded components will severely impact accessibility.
|
25 |
|
26 | ${(
|
27 | <Example
|
28 | packageName="@kalamazoo/theme"
|
29 | Component={require('../examples/deprecated-theme-provider').default}
|
30 | source={require('!!raw-loader!../examples/deprecated-theme-provider')}
|
31 | title="DEPRECATED AtlaskitThemeProvider"
|
32 | />
|
33 | )}
|
34 |
|
35 | ### AtlaskitThemeProvider Props
|
36 |
|
37 | ${(
|
38 | <Props
|
39 | heading=""
|
40 | props={require('!!extract-react-types-loader!../src/components/AtlaskitThemeProvider')}
|
41 | />
|
42 | )}
|
43 |
|
44 | ${(<Deprecated>getTheme()</Deprecated>)}
|
45 |
|
46 | Returns the current theme based on props. This has been deprecated in favour of simply accessing whatever you need using the \`Consumer\` or \`Theme\` components.
|
47 |
|
48 | _Due to the fact that this helper was never documented and is now deprecated, we will not document its usage and this only serves as a notice that it will be removed in the future._
|
49 |
|
50 | ${(<Deprecated>math</Deprecated>)}
|
51 |
|
52 | Exports of curried functions that do math operations in styled component primitives. They have been deprecated in favour of performing your own mathematical operations using plain JavaScript.
|
53 |
|
54 | _Due to the fact that this helper was never documented and is now deprecated, we will not document its usage and this only serves as a notice that it will be removed in the future._
|
55 |
|
56 | ${(<Deprecated>themed()</Deprecated>)}
|
57 |
|
58 | The \`themed()\` function is a way to define a theme for usage exclusively within Styled Component's primitives. Since we're moving to using React Context, this has been deprecated in favour of defining a theme with the \`Theme\` component.
|
59 |
|
60 | _Due to the fact that this helper was never documented and is now deprecated, we will not document its usage and this only serves as a notice that it will be removed in the future._
|
61 | `;
|