This package has been deprecated

Author message:

We merged all @superset-ui packages. Use @superset-ui/core instead.

@superset-ui/style
TypeScript icon, indicating that this package has built-in type declarations

0.14.23 • Public • Published

@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.

Dependencies (3)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @superset-ui/style

    Weekly Downloads

    875

    Version

    0.14.23

    License

    Apache-2.0

    Unpacked Size

    27.4 kB

    Total Files

    7

    Last publish

    Collaborators

    • eschutho
    • arash_suri
    • michael.s.molina
    • suddjian
    • superset-ui-owner
    • kristw
    • data-ui
    • conglei
    • christopher.card.williams
    • soboko
    • mistercrunch
    • cdchambers
    • khtruong
    • erik_ritter
    • graceguo-supercat
    • michellet
    • supersetbot
    • ktmud
    • villebro
    • rusackas
    • kgabryje