Skip to content

Commit

Permalink
Merge pull request #185 from web3ui/feat/addrowWidth
Browse files Browse the repository at this point in the history
Feat/addrow width
  • Loading branch information
locothedev authored Mar 3, 2022
2 parents 635ecba + f8909ef commit dd3f2f3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/Row/Row.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const RowDiv = styled.div<IRowProps>`
${fonts.text}
display: flex;
flex-wrap: wrap;
width: ${(props) => `${props.width && `${props.width}px`} `};
gap: ${(props) =>
props.rowGap ? `${props.rowGap}px ${props.colGap}px` : '15px 15px'};
align-items: ${(props) => props.alignItems && props.alignItems};
Expand Down
2 changes: 2 additions & 0 deletions src/components/Row/Row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ function Row({
sm = 16,
md = 24,
lg = 24,
width,
}: IRowProps): JSX.Element {
return (
<Context.Provider value={{ xs, md, sm, lg, rowGap, colGap }}>
Expand All @@ -57,6 +58,7 @@ function Row({
colGap={colGap}
rowGap={rowGap}
data-testid="row"
width={width}
>
{children}
</RowDiv>
Expand Down
4 changes: 4 additions & 0 deletions src/components/Row/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ export interface IRowProps {
* To Align items Horozontially
*/
justifyItems?: justifyStyles;
/**
* Width Of Row by default 100% of parent container size
*/
width?: number;
/**
* To specify the gap between each row element
*/
Expand Down

0 comments on commit dd3f2f3

Please sign in to comment.