dojo / widgets

:rocket: Dojo - UI widgets.
https://widgets.dojo.io
Other
88 stars 66 forks source link

Label text wrong color in material theme when input is not focused #1715

Closed KaneFreeman closed 3 years ago

KaneFreeman commented 3 years ago

Bug

Package Version: 8.0.0-pre

Code

import { create, tsx } from '@dojo/framework/core/vdom';
import TextInput from '@dojo/widgets/text-input';
import Example from '../../Example';

const factory = create();

export default factory(function Basic() {
    return (
        <Example>
            <TextInput>{{ label: 'Input label' }}</TextInput>
        </Example>
    );
});

Expected behavior:

Label color should switch to primary ONLY when input is focused. material-io

Actual behavior:

Label color switches to primary when input is focused OR input has a value. The current setup uses the active input to determine the color of the label instead of focus. dojo-widgets