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

refactor(form-controls): use functional components and react hooks #641

Merged
merged 10 commits into from
Nov 25, 2020
Prev Previous commit
Next Next commit
fix(TextField): update snapshots
  • Loading branch information
mshaaban0 committed Nov 25, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit d3c29319607013c7c125713c36ff6de376391855
Original file line number Diff line number Diff line change
@@ -58,45 +58,6 @@ exports[`renders the component with a copybutton 1`] = `
name="someComponent"
value=""
/>
<div
class="CopyButton TextInput__copy-button"
data-test-id="cf-ui-copy-button"
id="copyButton"
>
<span>
<button
class="CopyButton__button"
type="button"
>
<span
class="TabFocusTrap CopyButton__TabFocusTrap"
tabindex="-1"
>
<span
class="CopyButton__text"
>
Copy
to clipboard
</span>
<svg
class="Icon Icon--small Icon--muted"
data-test-id="cf-ui-icon"
height="1em"
viewBox="0 0 24 24"
width="1em"
>
<path
d="M0 0h24v24H0z"
fill="none"
/>
<path
d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"
/>
</svg>
</span>
</button>
</span>
</div>
</div>
</div>
`;
@@ -126,7 +87,6 @@ exports[`renders the component with a placeholder text 1`] = `
data-test-id="cf-ui-text-input"
id="someComponent"
name="someComponent"
placeholder="placeholder"
value=""
/>
</div>
@@ -158,7 +118,6 @@ exports[`renders the component with a rows defined 1`] = `
data-test-id="cf-ui-text-input"
id="someComponent"
name="someComponent"
rows="2"
value=""
/>
</div>
@@ -280,7 +239,7 @@ exports[`renders the component with additional prop 1`] = `
<input
aria-label="someComponent"
class="TextInput__input"
data-test-id="test"
data-test-id="cf-ui-text-input"
id="someComponent"
name="someComponent"
value=""
@@ -374,7 +333,6 @@ exports[`renders the component with characters count 1`] = `
class="TextInput__input"
data-test-id="cf-ui-text-input"
id="someComponent"
maxlength="20"
name="someComponent"
value=""
/>
@@ -459,7 +417,6 @@ exports[`renders the component with max length of characters 1`] = `
class="TextInput__input"
data-test-id="cf-ui-text-input"
id="someComponent"
maxlength="10"
name="someComponent"
value=""
/>