How to use the @xstyled/styled-components.button function in @xstyled/styled-components

To help you get started, we’ve selected a few @xstyled/styled-components 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 gregberge / gregberge.com / src / components / Form.js View on Github external
&::placeholder {
    color: light400;
  }

  &:hover {
    border-color: light400;
  }

  &:focus {
    outline: none;
    box-shadow: glow;
    border-color: accent;
  }
`

export const Button = styled.button`
  font-family: monospace;
  font-size: 15;
  appearance: none;
  background-color: light800;
  border: 1px solid;
  border-color: light500;
  border-radius: 5;
  color: accent;
  padding: 2 3;
  transition: base;
  cursor: pointer;
  margin-top: 3;

  &:active {
    transform: scale(1.05);
  }
github gregberge / gregberge.com / src / components / DarkModeSwitcher.js View on Github external
import React from 'react'
import styled, { keyframes, useColorMode } from '@xstyled/styled-components'

const blink = keyframes`
  from {
    opacity: 0;
  }

  to {
    opacity: 0.8;
  }
`

const Switcher = styled.button`
  width: 60;
  height: 30;
  position: relative;
  border-radius: 20;
  display: flex;
  align-items: center;
  padding: 0 6rpx;
  background-color: #a6b0f3;
  border: 0;
  opacity: 0;
  cursor: pointer;
  transition: opacity 200ms;

  &.ready {
    opacity: 1;
    transition: all 0.2s linear;
github gregberge / gregberge.com / src / components / Burger.js View on Github external
import React from 'react'
import styled, { th, up, css } from '@xstyled/styled-components'

const StyledBurger = styled.button`
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 20;
  height: 18;
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  transition: base;
  transition-property: opacity;

  &:focus {
    opacity: 0.5;
    outline: none;
  }