- 
                Notifications
    You must be signed in to change notification settings 
- Fork 0
Row and col component #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            9 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      d7155a1
              
                removing top and bottom padding from container
              
              
                nicosammito 597e403
              
                changes to children type for Card component. Now of type ReactNode an…
              
              
                nicosammito 5791dfe
              
                adding margin to outline prop to make sure component has right spacin…
              
              
                nicosammito 0c9c925
              
                flex for col
              
              
                nicosammito 6b58339
              
                col component first implementation
              
              
                nicosammito 0da77fe
              
                adding samples for Col and Row
              
              
                nicosammito 1954a21
              
                row component first implementation
              
              
                nicosammito 7dba099
              
                introduced col sizes similar to boostraps calculation
              
              
                nicosammito ecccadf
              
                Update image snapshots
              
              
                github-actions[bot] File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
  
    
      This file contains hidden or 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 | 
|---|---|---|
|  | @@ -33,6 +33,7 @@ | |
| &--outline { | ||
| outline: 1px solid borderColor(); | ||
| outline-offset: .5rem; | ||
| margin: .5rem; | ||
| } | ||
|  | ||
| &__section { | ||
|  | ||
  
    
      This file contains hidden or 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 hidden or 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,18 @@ | ||
| @use "sass:math"; | ||
| @import "../../styles/media"; | ||
|  | ||
| .col { | ||
| flex: 1 0 0; | ||
| } | ||
|  | ||
| @each $name, $breakpoint in $breakpoints { | ||
| @for $i from 1 through 12 { | ||
| .col-#{$name}-#{$i} { | ||
| @include respond-above($name) { | ||
| flex: 0 0 auto; | ||
| width: math.div($i, 12) * 100%; | ||
| } | ||
| } | ||
| } | ||
| } | ||
|  | 
  
    
      This file contains hidden or 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,25 @@ | ||
| import React, {HTMLProps, ReactNode} from "react"; | ||
| import "./Col.style.scss" | ||
|  | ||
| export type ColBreakPointRange = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12; | ||
|  | ||
| export interface ColType extends HTMLProps<HTMLDivElement> { | ||
| children: ReactNode | ReactNode[] | ||
| xs?: ColBreakPointRange | ||
| sm?: ColBreakPointRange | ||
| md?: ColBreakPointRange | ||
| lg?: ColBreakPointRange | ||
| xl?: ColBreakPointRange | ||
| xxl?: ColBreakPointRange | ||
| } | ||
|  | ||
| const Col: React.FC<ColType> = (props) => { | ||
|  | ||
| const {children, xs, sm, md, lg, xl, xxl, ...args} = props | ||
|  | ||
| return <div {...args} className={`col ${xs ? `col-xs-${xs}` : ""} ${sm ? `col-sm-${sm}` : ""} ${md ? `col-md-${md}` : ""} ${lg ? `col-lg-${lg}` : ""} ${xl ? `col-lg-${xl}` : ""} ${xxl ? `col-xxl-${xxl}` : ""}`}> | ||
| {children} | ||
| </div> | ||
| } | ||
|  | ||
| export default Col | ||
  
    
      This file contains hidden or 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 hidden or 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 hidden or 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,14 @@ | ||
| .row { | ||
| display: flex; | ||
| flex-wrap: wrap; | ||
|  | ||
| + .row { | ||
| margin-top: 1rem; | ||
| } | ||
|  | ||
| > * { | ||
| flex-shrink: 0; | ||
| max-width: 100%; | ||
| width: 100%; | ||
| } | ||
| } | 
  
    
      This file contains hidden or 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,17 @@ | ||
| import React, {HTMLProps, ReactNode} from "react"; | ||
| import "./Row.style.scss" | ||
|  | ||
| export interface RowType extends HTMLProps<HTMLDivElement> { | ||
| children: ReactNode | ReactNode[] | ||
| } | ||
|  | ||
| const Row: React.FC<RowType> = (props) => { | ||
|  | ||
| const {children, ...args} = props | ||
|  | ||
| return <div {...args} className={"row"}> | ||
| {children} | ||
| </div> | ||
| } | ||
|  | ||
| export default Row | 
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.