Skip to content

Implemenet FormGroup Componenet #46747

Closed

Description

@Sboonny

Props

  • controlId: string
  • validationState: string | null. [ 'success', 'warning', 'error', null ]
  • bsSize: string. [ "lg", "large", "sm", "small" ]
  • bsClass: string

Source

Variations

FormGroup.Label

ControlLabel source

Researching bootstrap lead to nothing. need to do more research later

FormGroup test

Activity

  1. changed the title [-]FormGroup @ahmadabdolsaheb[/-] [+]Implemenet FormGroup Componenet[/+] on Jul 2, 2022
  2. added
    scope: curriculum
    scope: UI
    on Jul 2, 2022
  3. Sboonny commented on Jul 4, 2022

    @Sboonny
    MemberAuthor

    styles from css

    .form-group {
      margin-bottom: 15px;
    }
    .has-success .help-block,
    .has-success .control-label,
    .has-success .radio,
    .has-success .checkbox,
    .has-success .radio-inline,
    .has-success .checkbox-inline,
    .has-success.radio label,
    .has-success.checkbox label,
    .has-success.radio-inline label,
    .has-success.checkbox-inline label {
      color: #3c763d;
    }
    .has-success .form-control {
      border-color: #3c763d;
      -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
              box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
    }
    .has-success .form-control:focus {
      border-color: #2b542c;
      -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;
              box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;
    }
    .has-success .input-group-addon {
      color: #3c763d;
      background-color: #dff0d8;
      border-color: #3c763d;
    }
    .has-success .form-control-feedback {
      color: #3c763d;
    }
    .has-warning .help-block,
    .has-warning .control-label,
    .has-warning .radio,
    .has-warning .checkbox,
    .has-warning .radio-inline,
    .has-warning .checkbox-inline,
    .has-warning.radio label,
    .has-warning.checkbox label,
    .has-warning.radio-inline label,
    .has-warning.checkbox-inline label {
      color: #8a6d3b;
    }
    .has-warning .form-control {
      border-color: #8a6d3b;
      -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
              box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
    }
    .has-warning .form-control:focus {
      border-color: #66512c;
      -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;
              box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;
    }
    .has-warning .input-group-addon {
      color: #8a6d3b;
      background-color: #fcf8e3;
      border-color: #8a6d3b;
    }
    .has-warning .form-control-feedback {
      color: #8a6d3b;
    }
    .has-error .help-block,
    .has-error .control-label,
    .has-error .radio,
    .has-error .checkbox,
    .has-error .radio-inline,
    .has-error .checkbox-inline,
    .has-error.radio label,
    .has-error.checkbox label,
    .has-error.radio-inline label,
    .has-error.checkbox-inline label {
      color: #a94442;
    }
    .has-error .form-control {
      border-color: #a94442;
      -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
              box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
    }
    .has-error .form-control:focus {
      border-color: #843534;
      -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;
              box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;
    }
    .has-error .input-group-addon {
      color: #a94442;
      background-color: #f2dede;
      border-color: #a94442;
    }
    .has-error .form-control-feedback {
      color: #a94442;
    }
  4. ahmaxed commented on Aug 15, 2022

    @ahmaxed
    Member

    For the validation style changes, we could use React.createContext and useContext to pass a state (validation) to its children. Since the checking for validation happens outside the form-group and passed to form-group, we could use react context to pass props formGroup's children and add classes conditionally.

  5. CaydenBurns commented on Oct 4, 2022

    @CaydenBurns

    I see this is still open but also saw that Sboonny submitted 4 tasks. I would love to take up this issue and implement a solution. Sorry if this is a redundant question but is this still available to work on? Thank you very much!

  6. Sboonny commented on Oct 4, 2022

    @Sboonny
    MemberAuthor

    @CaydenBurns this neither labeled help wanted or first time only, if you are interested in helping there are issues which labeled help wanted or first time only

  7. CaydenBurns commented on Oct 4, 2022

    @CaydenBurns

    I'm not looking for a first-time-only issue to solve, looking to add some quality code to an existing issue. I will look for a help wanted sign. my apologies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope: UIscope: curriculum

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions