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

Component System: Add FormGroup + ControlLabel components #28568

Merged
merged 19 commits into from
Feb 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
272 changes: 137 additions & 135 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@
"@wordpress/primitives": "file:../primitives",
"@wordpress/rich-text": "file:../rich-text",
"@wordpress/warning": "file:../warning",
"@wp-g2/components": "^0.0.150",
"@wp-g2/context": "^0.0.150",
"@wp-g2/styles": "^0.0.150",
"@wp-g2/utils": "^0.0.150",
"@wp-g2/components": "^0.0.152",
"@wp-g2/context": "^0.0.152",
"@wp-g2/styles": "^0.0.152",
"@wp-g2/utils": "^0.0.152",
"classnames": "^2.2.5",
"dom-scroll-into-view": "^1.2.1",
"downshift": "^6.0.15",
Expand All @@ -70,4 +70,4 @@
"publishConfig": {
"access": "public"
}
}
}
22 changes: 22 additions & 0 deletions packages/components/src/ui/control-label/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# ControlLabel

`ControlLabel` is a form component that works with `FormGroup` to provide a label for form elements (e.g. `Switch` or `TextInput`).

## Usage

```jsx
import {
__experimentalControlLabel as ControlLabel,
__experimentalFormGroup as FormGroup,
__experimentalTextInput as TextInput,
} from '@wordpress/components';

function Example() {
return (
<FormGroup>
<ControlLabel>First Name</ControlLabel>
<TextInput />
</FormGroup>
);
}
```
Loading