Flex

Flex 컴포넌트는 flexbox로 자식 요소를 배치하는 레이아웃 컴포넌트입니다.

기본적으로 display: flex 스타일이 적용되어 있습니다.

사용 방법

1import { Flex } from '@devup-ui/react'
2
3function App() {
4  return <Flex />
5}
1import { Flex } from '@devup-ui/react'
2
3function App() {
4  return <Flex />
5}

위에서 정의한 Flex 컴포넌트는 다음과 같이 렌더링됩니다.

1function App() {
2  return <div className="a" />
3}
1function App() {
2  return <div className="a" />
3}
1/* The component's own defaults sit in a lower cascade layer, so props override them */
2@layer b {
3  .a {
4    display: flex;
5  }
6}
1/* The component's own defaults sit in a lower cascade layer, so props override them */
2@layer b {
3  .a {
4    display: flex;
5  }
6}