Download wp-calypso/packages/composite-checkout/src/components/grid-row.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 772 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/composite-checkout/src/components/grid-row.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/packages/composite-checkout/src/components/grid-row.tsx
-
curl -L -o grid-row.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/composite-checkout/src/components/grid-row.tsx
772 Bytes
| import styled from '@emotion/styled'; | |
| import type { PropsWithChildren } from 'react'; | |
| const Row = styled.div< GridRowProps & React.HTMLAttributes< HTMLDivElement > >` | |
| display: -ms-grid; | |
| display: grid; | |
| width: 100%; | |
| -ms-grid-columns: ${ ( props ) => props.columnWidths.replace( ' ', ' ' + props.gap + ' ' ) }; | |
| grid-template-columns: ${ ( props ) => props.columnWidths }; | |
| grid-column-gap: ${ ( props ) => props.gap }; | |
| justify-items: stretch; | |
| `; | |
| export default function GridRow( { | |
| gap, | |
| columnWidths, | |
| className, | |
| children, | |
| }: PropsWithChildren< GridRowProps > ) { | |
| return ( | |
| <Row gap={ gap } columnWidths={ columnWidths } className={ className }> | |
| { children } | |
| </Row> | |
| ); | |
| } | |
| interface GridRowProps { | |
| className?: string; | |
| gap: string; | |
| columnWidths: string; | |
| } | |