From 32e9ac56d6c9fb35903d05ec1367dc7c852ed889 Mon Sep 17 00:00:00 2001 From: dannyk3941 <52807859+dannyk3941@users.noreply.github.com> Date: Tue, 6 Jun 2023 09:19:48 -0400 Subject: [PATCH] Feat/select element (#34) * fix: select element with base story * chore: clean up css and story controls * chore: update components _index.scss for select * fix: review comments for story controls * chore: remove control defaults --- .../images/angle-arrow-down-gray-90.svg | 1 + .../src/components/select/select.stories.js | 104 ++++++++++++ packages/vanilla/src/sass/base/_core.scss | 3 +- .../vanilla/src/sass/components/_index.scss | 2 +- .../vanilla/src/sass/components/_select.scss | 152 ------------------ .../src/sass/components/select/_index.scss | 40 +++++ 6 files changed, 147 insertions(+), 155 deletions(-) create mode 100644 packages/vanilla/assets/images/angle-arrow-down-gray-90.svg create mode 100644 packages/vanilla/src/components/select/select.stories.js delete mode 100644 packages/vanilla/src/sass/components/_select.scss create mode 100644 packages/vanilla/src/sass/components/select/_index.scss diff --git a/packages/vanilla/assets/images/angle-arrow-down-gray-90.svg b/packages/vanilla/assets/images/angle-arrow-down-gray-90.svg new file mode 100644 index 00000000..1a5d2442 --- /dev/null +++ b/packages/vanilla/assets/images/angle-arrow-down-gray-90.svg @@ -0,0 +1 @@ +angle-arrow-down-gray-90 \ No newline at end of file diff --git a/packages/vanilla/src/components/select/select.stories.js b/packages/vanilla/src/components/select/select.stories.js new file mode 100644 index 00000000..d4ed8285 --- /dev/null +++ b/packages/vanilla/src/components/select/select.stories.js @@ -0,0 +1,104 @@ +export default { + title: 'Patterns', + parameters: { + html: { + root: '.cbp-form' + } + }, + argTypes: { + label: { + name: 'Label', + description: 'Represents a caption for the `` element.', + control: { type: 'text' } + }, + inputId: { + name: 'Input ID', + description: 'The `id` on the native `select` tag, required to link the `label` and `select` for accessibility purposes.', + control: { type: 'text' } + }, + formControlName: { + name: 'Input Name', + description: 'Name of the form control in the input element. Submitted with the form as part of a name/value pair.', + control: { type: 'text' } + }, + errorMessage: { + name: 'Error Message', + description: 'A message in the input description that a problem has occurred.', + control: { type: 'text' } + }, + optionsObj: { + name: 'Options Object', + description: 'Sets the label of the `