-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[![PR App][icn]][demo] | Fix RM-11030 :-------------------:|:----------: ## 🧰 Changes - Implement `Columns` component <img width="500" alt="image" src="https://github.com/user-attachments/assets/eba81b86-f6c4-4791-ae91-ae0b757083d1"> <img width="500" alt="image" src="https://github.com/user-attachments/assets/b6b12f72-f490-4bd0-9624-7a3fc4a2d74d"> ## 🧬 QA & Testing - [Broken on production][prod]. - [Working in this PR app][demo]. [demo]: https://markdown-pr-PR_NUMBER.herokuapp.com [prod]: https://SUBDOMAIN.readme.io [icn]: https://user-images.githubusercontent.com/886627/160426047-1bee9488-305a-4145-bb2b-09d8b757d38a.svg
- Loading branch information
1 parent
97a7ae7
commit 1a3625a
Showing
4 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React from 'react'; | ||
|
||
import './style.scss'; | ||
|
||
export const Column = ({ children }) => { | ||
return ( | ||
<div className="Column">{children}</div> | ||
) | ||
} | ||
|
||
const Columns = ({ children, columns = 2, layout = 'auto'}) => { | ||
layout = layout === 'fixed' ? '1fr' : 'auto'; | ||
return ( | ||
<div className="Columns" style={{ gridTemplateColumns: `repeat(${columns}, ${layout})` }}> | ||
{children} | ||
</div> | ||
); | ||
}; | ||
|
||
export default Columns; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.Columns { | ||
display: grid; | ||
gap: var(--md, 20px); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters