Skip to content
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

Add display type and color to OuiSwitch #1332

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

AMoo-Miki
Copy link
Collaborator

@AMoo-Miki AMoo-Miki commented Aug 5, 2024

Description

Add display type and color to OuiSwitch

  • color makes OuiSwitch colorable like OuiButton
  • display allows showing a border around the switch like OuiButtonIcon

Screenshot 2024-08-05 at 11-25-48 Form controls - OpenSearch UI Framework

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • All tests pass
    • yarn lint
    • yarn test-unit
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@AMoo-Miki
Copy link
Collaborator Author

OSD failure is expected.

Copy link
Collaborator

@virajsanghvi virajsanghvi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add an example to website/docs?

Could you post a screenshot of these?

vertical-align: middle;
align-items: stretch;
border-radius: $ouiBorderRadius;
padding: 0 $euiSize - $euiSizeXS;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we be using ouiSize* here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops yes!

{
'ouiSwitch--compressed': compressed,
'ouiSwitch-isDisabled': disabled,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OUI has some logic which is not clear to me for using -- and -. However, for isDIsabled they have used only one - consistently. Maybe - for state and -- is for variant? Donno.

Copy link
Collaborator

@virajsanghvi virajsanghvi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving for expediency - can follow up with docs

@AMoo-Miki AMoo-Miki merged commit 1f67bce into opensearch-project:main Aug 5, 2024
14 of 15 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 5, 2024
Signed-off-by: Miki <[email protected]>
(cherry picked from commit 1f67bce)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
AMoo-Miki pushed a commit that referenced this pull request Aug 5, 2024
Signed-off-by: Miki <[email protected]>
(cherry picked from commit 1f67bce)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@ps48 ps48 mentioned this pull request Aug 8, 2024
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants