-
Notifications
You must be signed in to change notification settings - Fork 15
Enchance conditional node saving #1132
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
base: v3.3.1
Are you sure you want to change the base?
Changes from all commits
2a5d92a
1e2f3f7
181a8d2
4d1279f
d21a9ef
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| import { Track } from 'components'; | ||
| import React from 'react'; | ||
| import { useTranslation } from 'react-i18next'; | ||
|
|
||
| import { GroupType } from './types'; | ||
|
|
||
| interface ConnectorToggleProps { | ||
| readonly connector: GroupType; | ||
| readonly connectorNot: boolean; | ||
| readonly onChangeConnector: (connector: GroupType) => void; | ||
| readonly onToggleNot: () => void; | ||
| } | ||
|
|
||
| const ConnectorToggle: React.FC<ConnectorToggleProps> = ({ | ||
| connector, | ||
| connectorNot, | ||
| onChangeConnector, | ||
| onToggleNot, | ||
| }) => { | ||
| const { t } = useTranslation(); | ||
|
|
||
| const notButtonClassName = connectorNot ? 'rule-red' : 'rule-gray'; | ||
| const andButtonClassName = connector === 'and' ? 'rule-green' : 'rule-gray'; | ||
| const orButtonClassName = connector === 'or' ? 'rule-green' : 'rule-gray'; | ||
|
|
||
| return ( | ||
| <Track> | ||
| <button className={`small-rule-group-button ${notButtonClassName}`} onClick={onToggleNot}> | ||
| {t('serviceFlow.popup.not')} | ||
| </button> | ||
|
Check warning on line 30 in GUI/src/components/FlowElementsPopup/RuleBuilder/ConnectorToggle.tsx
|
||
| <button className={`small-rule-group-button ${andButtonClassName}`} onClick={() => onChangeConnector('and')}> | ||
| {t('serviceFlow.popup.and')} | ||
| </button> | ||
|
Check warning on line 33 in GUI/src/components/FlowElementsPopup/RuleBuilder/ConnectorToggle.tsx
|
||
| <button className={`small-rule-group-button ${orButtonClassName}`} onClick={() => onChangeConnector('or')}> | ||
| {t('serviceFlow.popup.or')} | ||
| </button> | ||
|
Check warning on line 36 in GUI/src/components/FlowElementsPopup/RuleBuilder/ConnectorToggle.tsx
|
||
| </Track> | ||
| ); | ||
| }; | ||
|
|
||
| export default ConnectorToggle; | ||
Uh oh!
There was an error while loading. Please reload this page.