-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description - Now is possible to set up an event as private (default public) - The status of an event will be visible inside the event details <!-- Add a description of the changes that this PR introduces and the files that are the most critical to review. --> --- ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] targeted the correct branch - [ ] provided a link to the relevant issue or specification - [ ] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed all author checklist items have been addressed
- Loading branch information
Alessandro Mazzon
authored
Nov 11, 2023
1 parent
c6246a2
commit f4cece1
Showing
10 changed files
with
83 additions
and
10 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,40 @@ | ||
import { InputSwitch } from "primereact/inputswitch"; | ||
import React, { useState } from "react"; | ||
|
||
interface Props { | ||
readonly title: string; | ||
readonly value?: boolean; | ||
readonly onChange?: (value: boolean) => void; | ||
readonly required?: boolean; | ||
} | ||
|
||
const BondscapeSwitch = ({ title, value, onChange, required }: Props) => { | ||
const [isChecked, setIsChecked] = useState(value || false); | ||
return ( | ||
<div className="flex flex-1 flex-row bg-bondscape-text_neutral_100 gap-2 px-[1rem] rounded-[16px] items-center"> | ||
<div className="flex w-[130px]"> | ||
<label className="text-[16px] text-bondscape-text_neutral_900"> | ||
{title} | ||
</label> | ||
{required && <span className="ml-1 text-[#FF8686]">*</span>} | ||
</div> | ||
<InputSwitch | ||
pt={{ | ||
// @ts-ignore | ||
slider: ({ props }) => ({ | ||
className: props.checked | ||
? "bg-bondscape-primary" | ||
: "bg-bondscape-text_neutral_300", | ||
}), | ||
}} | ||
checked={isChecked} | ||
onChange={(e) => { | ||
setIsChecked(e.value); | ||
onChange && onChange(e.value); | ||
}} | ||
/> | ||
</div> | ||
); | ||
}; | ||
|
||
export default BondscapeSwitch; |
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
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
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