Skip to content

Commit

Permalink
docs: remove styled-components documentation references
Browse files Browse the repository at this point in the history
  • Loading branch information
DSil committed Mar 25, 2024
1 parent d5050f1 commit 0b2a0cb
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 176 deletions.
11 changes: 0 additions & 11 deletions docs/src/documentation/01-getting-started/02-for-developers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ npm install @kiwicom/orbit-components
yarn add @kiwicom/orbit-components
```

Don't forget to also install [styled-components](https://github.com/styled-components/styled-components/) `^4.0.0`.

## Usage

1. Import the fonts that are used in `orbit-components`:
Expand Down Expand Up @@ -64,15 +62,6 @@ You can also try `orbit-components` live on [CodeSandbox](https://codesandbox.io
## Typescript

Orbit comes with Typescript definition files.
If you're working with Typescript, you need to add a type for `styled-components`.

```shell
// with npm
npm install @types/styled-components --save-dev

// with yarn
yarn add @types/styled-components -D
```

## Main Sections

Expand Down
31 changes: 0 additions & 31 deletions docs/src/documentation/02-foundation/04-color/03-theming.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,3 @@ title: Theming
You can create your own [design tokens](/foundation/design-tokens/) for themes and use them in your components.

<ReactExample exampleId="Theme-default" />

### Styled components

For custom usage in `styled-components`,
you should always depend on the actual `theme` property stored inside your context:

```jsx
import React from "react";
import styled from "styled-components";

const StyledDiv = styled.div`
margin: ${({ theme }) => theme.orbit.spaceLarge};
`;
```

If you don't use a theming context in your application and you still want to use context,
declare `defaultProps` for your styled component:

```jsx
import React from "react";
import styled from "styled-components";
import defaultTheme from "@kiwicom/orbit-components/lib/defaultTheme";

const StyledDiv = styled.div`
margin: ${({ theme }) => theme.orbit.spaceLarge};
`;

StyledDiv.defaultProps = {
theme: defaultTheme,
};
```

This file was deleted.

This file was deleted.

0 comments on commit 0b2a0cb

Please sign in to comment.