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

docs(components): tup-356 bootstrap.form #52

Merged
merged 2 commits into from
Nov 7, 2022
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
7 changes: 0 additions & 7 deletions src/lib/_imports/components/bootstrap.form.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
/*
Form (Bootstrap)
Override Bootstrap styles. See:
- [ReactStrap Forms](https://reactstrap.github.io/components/form/)
- [Bootstrap Forms](https://getbootstrap.com/docs/4.4/components/forms/)
Styleguide Components.Bootstrap.Form
*/
@import url('../settings/border.css');

.form-control {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
To override and extend [Bootstrap Forms](https://getbootstrap.com/docs/4.3/components/forms/).

> **⚠️ WARNING**
>
> Core Styles are negligible, because this is used **only on Portal** to extend **its** overrides of Bootstrap.

> **→ TO DO**
>
> - [ ] **Either** migrate Portal Bootstrap form styling to this component.
> - [ ] **Or** return these styles to Portal (and remove form Core Styles).

<script>
/* To open external links in new window */
Array.from(document.links)
.filter(link => link.hostname != window.location.hostname)
.forEach(link => link.target = '_blank');
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
status: prototype
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{{> @bootstrap.css }}
<link rel="stylesheet" href="{{path '/components/c-button.css'}}" />

<form>
<label for="field-name">Name</label>
<input type="text" class="form-control" id="field-name" name="name" placeholder="Jane Doe">
<br />
<label for="field-username">Username</label>
<div class="input-group">
<div class="input-group-prepend">
<div class="input-group-text">@</div>
</div>
<input type="text" class="form-control" id="field-username" name="username" placeholder="Username">
</div>
<br />
<label for="field-intro">Tell us about yourself</label>
<textarea class="form-control" id="field-intro" name="intro" rows="3"></textarea>
<br />
<button type="submit" class="c-button c-button--primary">Submit</button>
</form>

{{> @bootstrap.js }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/* This CSS is ONLY for the pattern library. It is NOT part of the pattern. */
form {
margin: 1em;
}