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

feat(form-field): rendering, styling, testing and documenting #97

Merged
merged 7 commits into from
Jul 18, 2023

Conversation

Leotheluck
Copy link
Contributor

Component: OsdsFormField

A Form Field component is used to wrap several form components with logic, visual hints and additional styling.

Attributes:

// if set, update helper slot with the error message and apply error style
error?: string
flex?: boolean

Usages:

// Default
<osds-form-field>
  <osds-text slot="label">
    Description
  </osds-text>

  <osds-text slot="visual-hint">
    150/200
  </osds-text>

  <osds-textarea>
  </osds-textarea>

  <osds-text slot="helper">
    Write a few sentences about you
  </osds-text>
</osds-form-field>

// Field Error
<osds-form-field error="This field is required">
  <osds-text slot="label">
    Description
  </osds-text>

  <osds-text slot="visual-hint">
    0/200
  </osds-text>

  <osds-textarea> </osds-textarea>

  <osds-text slot="helper">
    Write a few sentences about you
  </osds-text>
</osds-form-field>

@Leotheluck Leotheluck requested a review from a team as a code owner July 10, 2023 13:40
packages/stencil/components/form-field/package.json Outdated Show resolved Hide resolved
packages/stencil/components/form-field/package.json Outdated Show resolved Hide resolved
packages/stencil/components/form-field/package.json Outdated Show resolved Hide resolved
packages/stencil/components/form-field/react/package.json Outdated Show resolved Hide resolved
packages/stencil/components/form-field/react/package.json Outdated Show resolved Hide resolved
packages/stencil/components/form-field/stencil.config.ts Outdated Show resolved Hide resolved
packages/stencil/components/form-field/stencil.config.ts Outdated Show resolved Hide resolved
packages/stencil/components/form-field/vue/package.json Outdated Show resolved Hide resolved
packages/stencil/components/form-field/vue/package.json Outdated Show resolved Hide resolved
@ovh-cds
Copy link
Collaborator

ovh-cds commented Jul 11, 2023

CDS Report build#889.0 ✘
*

  • build ✘

Copy link
Contributor

@dpellier dpellier left a comment

Choose a reason for hiding this comment

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

You need to rebase properly on master, as you embed doc changes which were merged already

@dpellier dpellier merged commit d249998 into master Jul 18, 2023
@dpellier dpellier deleted the feat/form-field branch July 18, 2023 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants