-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- create file for micro macro switch
- Loading branch information
1 parent
c79555b
commit 9d79c6a
Showing
2 changed files
with
44 additions
and
39 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
front/src/applications/operationalStudies/components/MicroMacroSwitch.tsx
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,34 @@ | ||
import React from 'react'; | ||
|
||
import cx from 'classnames'; | ||
|
||
type MicroMacroSwitchProps = { | ||
isMacro: boolean; | ||
onClickButton: (isMacro: boolean) => void; | ||
t: (key: string) => string; | ||
}; | ||
|
||
const MicroMacroSwitch = ({ isMacro, onClickButton, t }: MicroMacroSwitchProps) => ( | ||
<div className="tabs-container"> | ||
<div className="tabs"> | ||
<div | ||
className={cx('tab', { active: !isMacro })} | ||
role="button" | ||
tabIndex={0} | ||
onClick={() => onClickButton(false)} | ||
> | ||
{t('microscopic')} | ||
</div> | ||
<div | ||
className={cx('tab', { active: isMacro })} | ||
role="button" | ||
tabIndex={0} | ||
onClick={() => onClickButton(true)} | ||
> | ||
{t('macroscopic')} | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
|
||
export default MicroMacroSwitch; |
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