DaleStudy / dale-ui

디자인 시스템
1 stars 0 forks source link

StyleX vs Panda CSS #5

Closed nhistory closed 39 minutes ago

nhistory commented 1 month ago

StyleX vs Panda CSS

StyleX

특징

장점

단점

Panda CSS

특징

장점

단점

비교

StyleX

import * as stylex from '@stylexjs/stylex';

const styles = stylex.create({
  container: {
    display: 'flex',
    flexDirection: 'column',
    alignItems: 'center',
    padding: 16,
    '@media (min-width: 768px)': {
      flexDirection: 'row',
      justifyContent: 'space-between',
    },
  },
  title: {
    fontSize: 24,
    fontWeight: 'bold',
    color: 'navy',
    '@media (min-width: 768px)': {
      fontSize: 32,
    },
  },
});

function MyComponent() {
  return (
    <div {...stylex.props(styles.container)}>
      <h1 {...stylex.props(styles.title)}>Responsive StyleX</h1>
    </div>
  );
}

Panda CSS

import { css } from '../styled-system/css'

function MyComponent() {
  return (
    <div className={css({
      display: 'flex',
      flexDirection: 'column',
      alignItems: 'center',
      padding: '4',
      md: {
        flexDirection: 'row',
        justifyContent: 'space-between',
      }
    })}>
      <h1 className={css({
        fontSize: '2xl',
        fontWeight: 'bold',
        color: 'navy',
        md: {
          fontSize: '4xl',
        }
      })}>
        Responsive Panda CSS
      </h1>
    </div>
  )
}
DaleSeo commented 39 minutes ago

Panda CSS로 최종 결정