0.14.23 • Published 5 years ago

@superset-ui/style v0.14.23

Weekly downloads
739
License
Apache-2.0
Repository
github
Last release
5 years ago

@superset-ui/style

Version David (path)

Provides a style object containing a variety of style parameters for theming Superset components with Emotion. See SIP-37 for additional context. This will eventually allow for custom themes to override default Superset styles. These parameters (and the styled-components/emotion design pattern) will, over time, be used to whittle away at widely-scoped LESS styles, making it easier to build and (re)style Superset components.

Usage

import { styled, supersetTheme, ThemeProvider } from '@superset-ui/style';

// use emotion api as normal, but the theme uses the correct types
const MyHeader = styled.h1`
  color: ${props => props.theme.colors.primary.base};
  font-family: sans-serif;
`

class App extends React.Component {
  render() {
    return (
      <ThemeProvider theme={supersetTheme}>
        <MyHeader>Properly styled text!</MyHeader>
      </ThemeProvider>
    );
  }
}

Note: the ThemeProvider is already included in the project's Storybook (as a decorator) meaning you should be able to apply/view any new Emotion-based theme attributes and see them reflected in the storybook without any additional setup.

0.14.23

5 years ago

0.14.20

5 years ago

0.14.9

5 years ago

0.14.3

5 years ago

0.14.0

5 years ago

0.13.30

5 years ago

0.13.27

5 years ago

0.13.26

5 years ago

0.13.21

5 years ago

0.13.11

5 years ago

0.13.3

5 years ago

0.13.0

5 years ago

0.12.21

5 years ago

0.12.19

5 years ago

0.12.17

5 years ago