-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#585 create disabled option on rigth panel
- Loading branch information
Showing
5 changed files
with
61 additions
and
1 deletion.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
src/pods/properties/components/disabled/disabled-selector.component.module.css
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,17 @@ | ||
.container { | ||
display: flex; | ||
gap: 0.5em; | ||
align-items: center; | ||
padding: var(--space-xs) var(--space-md); | ||
border-bottom: 1px solid var(--primary-300); | ||
} | ||
|
||
.container :first-child { | ||
flex: 1; | ||
} | ||
|
||
.checkbox { | ||
width: var(--space-md); | ||
height: var(--space-md); | ||
cursor: pointer; | ||
} |
23 changes: 23 additions & 0 deletions
23
src/pods/properties/components/disabled/disabled-selector.component.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,23 @@ | ||
import classes from './disabled-selector.component.module.css'; | ||
|
||
interface Props { | ||
label: string; | ||
disabled: boolean; | ||
onChange: (disabled: boolean) => void; | ||
} | ||
|
||
export const Disabled: React.FC<Props> = props => { | ||
const { label, disabled, onChange } = props; | ||
|
||
return ( | ||
<div className={classes.container}> | ||
<p>{label}</p> | ||
<input | ||
type="checkbox" | ||
checked={disabled} | ||
onChange={() => onChange(!disabled)} | ||
className={classes.checkbox} | ||
/> | ||
</div> | ||
); | ||
}; |
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 @@ | ||
export * from './disabled-selector.component'; |
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