How to use @looker/design-tokens - 10 common examples

To help you get started, we’ve selected a few @looker/design-tokens examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github looker-open-source / components / packages / components / src / Form / Inputs / InputSearch / InputSearchControls.tsx View on Github external
}) => {
  const clear = (
    
  )

  const separator = (
    
  )

  // @TODO - User should be able to "click through" the text (not the button tho)
  return (
    
      {summary && (
github looker-open-source / components / packages / components / src / Modal / Layout / ModalContent.tsx View on Github external
{(height: string) => }
    
  )
}

const Outer = styled.div`
  ${reset}
  ${layout}

  overflow: auto;
  flex: 8;

  &.overflow {
    box-shadow: inset 0 -16px 16px -16px ${palette.charcoal200},
      inset 0 16px 16px -16px ${palette.charcoal200};
  }
`

const Inner = styled.div`
  ${reset}
  ${space}
`

Inner.defaultProps = { px: 'xlarge', py: 'large' }
github looker-open-source / components / packages / components / src / Menu / MenuItem / menuItemStyle.ts View on Github external
bg: palette.charcoal100,
  color: palette.charcoal900,
}

const current: MenuItemStateStyle = {
  ...hover,
  fontWeight: 'bold',
  iconColor: palette.charcoal900,
}

export const defaultMenuItemStyle: MenuItemStyle = {
  current,
  hover,
  initial,
  marker: {
    color: palette.charcoal900,
    size: 4,
  },
}
github looker-open-source / components / packages / components / src / Menu / MenuItem / menuItemStyle.ts View on Github external
fontSize: 'small',
  fontWeight: 'normal',
  iconColor: palette.charcoal300,
  iconSize: 20,
}

const hover: MenuItemStateStyle = {
  ...initial,
  bg: palette.charcoal100,
  color: palette.charcoal900,
}

const current: MenuItemStateStyle = {
  ...hover,
  fontWeight: 'bold',
  iconColor: palette.charcoal900,
}

export const defaultMenuItemStyle: MenuItemStyle = {
  current,
  hover,
  initial,
  marker: {
    color: palette.charcoal900,
    size: 4,
  },
}
github looker-open-source / components / packages / components / src / Menu / MenuItem / menuItemStyle.ts View on Github external
}
}

const initial: MenuItemStateStyle = {
  bg: palette.white,
  color: palette.charcoal600,
  fontSize: 'small',
  fontWeight: 'normal',
  iconColor: palette.charcoal300,
  iconSize: 20,
}

const hover: MenuItemStateStyle = {
  ...initial,
  bg: palette.charcoal100,
  color: palette.charcoal900,
}

const current: MenuItemStateStyle = {
  ...hover,
  fontWeight: 'bold',
  iconColor: palette.charcoal900,
}

export const defaultMenuItemStyle: MenuItemStyle = {
  current,
  hover,
  initial,
  marker: {
    color: palette.charcoal900,
    size: 4,
  },
github looker-open-source / components / packages / components / src / Menu / MenuItem / menuItemStyle.ts View on Github external
iconColor: string
  iconSize: number
}

export interface MenuItemStyle {
  current: MenuItemStateStyle
  hover: MenuItemStateStyle
  initial: MenuItemStateStyle
  marker: {
    color: string
    size: number
  }
}

const initial: MenuItemStateStyle = {
  bg: palette.white,
  color: palette.charcoal600,
  fontSize: 'small',
  fontWeight: 'normal',
  iconColor: palette.charcoal300,
  iconSize: 20,
}

const hover: MenuItemStateStyle = {
  ...initial,
  bg: palette.charcoal100,
  color: palette.charcoal900,
}

const current: MenuItemStateStyle = {
  ...hover,
  fontWeight: 'bold',
github looker-open-source / components / packages / components / src / Form / Inputs / ToggleSwitch / ToggleSwitch.tsx View on Github external
space,
  SpaceProps,
} from '@looker/design-tokens'
import { InputProps } from '../InputProps'

export interface CustomizableToggleSwitchAttributes
  extends CustomizableAttributes {
  knobOnColor: string
  knobOffColor: string
  onColor: string
  offColor: string
}

export const CustomizableToggleSwitchAttributes: CustomizableToggleSwitchAttributes = {
  knobOffColor: palette.white,
  knobOnColor: palette.white,
  offColor: palette.charcoal300,
  onColor: palette.purple300,
}

export interface KnobProps {
  className?: string
  size: number
  disabled?: boolean
  on?: boolean
}

interface KnobContainerBaseProps extends KnobProps, PseudoProps {
  children: ReactNode
}

export interface ToggleSwitchProps
github looker-open-source / components / packages / components / src / Form / Inputs / ToggleSwitch / ToggleSwitch.tsx View on Github external
reset,
  space,
  SpaceProps,
} from '@looker/design-tokens'
import { InputProps } from '../InputProps'

export interface CustomizableToggleSwitchAttributes
  extends CustomizableAttributes {
  knobOnColor: string
  knobOffColor: string
  onColor: string
  offColor: string
}

export const CustomizableToggleSwitchAttributes: CustomizableToggleSwitchAttributes = {
  knobOffColor: palette.white,
  knobOnColor: palette.white,
  offColor: palette.charcoal300,
  onColor: palette.purple300,
}

export interface KnobProps {
  className?: string
  size: number
  disabled?: boolean
  on?: boolean
}

interface KnobContainerBaseProps extends KnobProps, PseudoProps {
  children: ReactNode
}
github looker-open-source / components / packages / components / src / Menu / MenuItem / menuItemStyle.ts View on Github external
export interface MenuItemStyle {
  current: MenuItemStateStyle
  hover: MenuItemStateStyle
  initial: MenuItemStateStyle
  marker: {
    color: string
    size: number
  }
}

const initial: MenuItemStateStyle = {
  bg: palette.white,
  color: palette.charcoal600,
  fontSize: 'small',
  fontWeight: 'normal',
  iconColor: palette.charcoal300,
  iconSize: 20,
}

const hover: MenuItemStateStyle = {
  ...initial,
  bg: palette.charcoal100,
  color: palette.charcoal900,
}

const current: MenuItemStateStyle = {
  ...hover,
  fontWeight: 'bold',
  iconColor: palette.charcoal900,
}

export const defaultMenuItemStyle: MenuItemStyle = {