-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: quick freeze/unfreeze (#802)
- Loading branch information
1 parent
09aa113
commit ead874a
Showing
20 changed files
with
449 additions
and
490 deletions.
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.
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
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,32 @@ | ||
.dividerContainer { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
} | ||
|
||
.dividerContainer .dividerLine { | ||
margin: 0; | ||
width: 50%; | ||
flex-grow: 0; | ||
flex-shrink: 1; | ||
} | ||
|
||
.dividerContainer .dividerButton { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
margin: 0 1rem; | ||
flex-shrink: 0; | ||
flex-grow: 1; | ||
color: var(--bs-body-color); | ||
cursor: pointer; | ||
background-color: transparent; | ||
border: 1px solid var(--bs-body-color); | ||
border-radius: 50%; | ||
width: 2rem; | ||
height: 2rem; | ||
} | ||
|
||
.dividerContainer .dividerButton:disabled { | ||
cursor: not-allowed; | ||
} |
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,27 @@ | ||
import * as rb from 'react-bootstrap' | ||
import classNames from 'classnames' | ||
import Sprite from './Sprite' | ||
import styles from './Divider.module.css' | ||
|
||
type DividerProps = rb.ColProps & { | ||
toggled: boolean | ||
onToggle: (current: boolean) => void | ||
disabled?: boolean | ||
className?: string | ||
} | ||
|
||
export default function Divider({ toggled, onToggle, disabled, className, ...colProps }: DividerProps) { | ||
return ( | ||
<rb.Row className={classNames('d-flex', 'justify-content-center', className)}> | ||
<rb.Col xs={12} {...colProps}> | ||
<div className={styles.dividerContainer}> | ||
<hr className={styles.dividerLine} /> | ||
<button className={styles.dividerButton} disabled={disabled} onClick={() => onToggle(toggled)}> | ||
<Sprite symbol={toggled ? 'caret-up' : 'caret-down'} width="20" height="20" /> | ||
</button> | ||
<hr className={styles.dividerLine} /> | ||
</div> | ||
</rb.Col> | ||
</rb.Row> | ||
) | ||
} |
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
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
Oops, something went wrong.