Skip to content

Commit

Permalink
fix(textfield): remove use of sp-icons-*
Browse files Browse the repository at this point in the history
  • Loading branch information
Westbrook committed Apr 15, 2020
1 parent 95b96b8 commit 9a5c213
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 17 deletions.
2 changes: 0 additions & 2 deletions packages/checkbox/test/checkbox.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ describe('Checkbox', () => {
testFixture = await fixture<HTMLDivElement>(
html`
<div>
<sp-icons-medium></sp-icons-medium>
<div id="test-checkbox">
<sp-checkbox id="checkbox0" tabindex="5">
Component
Expand Down
2 changes: 1 addition & 1 deletion packages/textfield/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
},
"dependencies": {
"@spectrum-web-components/icon": "^0.4.5",
"@spectrum-web-components/icons": "^0.3.0",
"@spectrum-web-components/icons-ui": "^0.0.1",
"@spectrum-web-components/shared": "^0.4.5",
"tslib": "^1.10.0"
}
Expand Down
23 changes: 10 additions & 13 deletions packages/textfield/src/textfield.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ import {

import { Focusable } from '@spectrum-web-components/shared/lib/focusable.js';
import '@spectrum-web-components/icon';
import '@spectrum-web-components/icons';
import {
AlertSmallIcon,
CheckmarkSmallIcon,
} from '@spectrum-web-components/icons-ui';

import textfieldStyles from './textfield.css.js';
import checkmarkSmallStyles from '@spectrum-web-components/icon/lib/spectrum-icon-checkmark-small.css.js';
Expand Down Expand Up @@ -114,21 +117,15 @@ export class Textfield extends Focusable {
protected renderStateIcons(): TemplateResult | typeof nothing {
if (this.invalid) {
return html`
<sp-icons-large></sp-icons-large>
<sp-icon
id="invalid"
name="ui:AlertSmall"
class="alert-small"
></sp-icon>
<sp-icon id="invalid" class="alert-small">
${AlertSmallIcon({ hidden: true })}
</sp-icon>
`;
} else if (this.valid) {
return html`
<sp-icons-large></sp-icons-large>
<sp-icon
id="valid"
name="ui:CheckmarkSmall"
class="checkmark-small"
></sp-icon>
<sp-icon id="valid" class="checkmark-small">
${CheckmarkSmallIcon({ hidden: true })}
</sp-icon>
`;
}
return nothing;
Expand Down
2 changes: 1 addition & 1 deletion packages/textfield/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"include": ["src/*.ts"],
"references": [
{ "path": "../icon" },
{ "path": "../icons" },
{ "path": "../icons-ui" },
{ "path": "../shared" }
]
}

0 comments on commit 9a5c213

Please sign in to comment.