Skip to content

Commit

Permalink
Use Codex button instead of Wikit button
Browse files Browse the repository at this point in the history
A fairly straightforward replacement – we just have to rename a few
props and update one selector.

The button’s size changes ever so slightly; IMHO the Codex version looks
a tad nicer anyway.

Bug: T370052
Co-Authored-By: Arthur Taylor <arthur.taylor@wikimedia.de>
  • Loading branch information
lucaswerkmeister and codders committed Sep 19, 2024
1 parent 0a92937 commit 8c35b7f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/components/NewLexemeForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
ref,
} from 'vue';
import { useStore } from 'vuex';
import { Button as WikitButton } from '@wmde/wikit-vue-components';
import { CdxButton } from '@wikimedia/codex';
import { useConfig } from '@/plugins/ConfigPlugin/Config';
import { useMessages } from '@/plugins/MessagesPlugin/Messages';
import LemmaInput from '@/components/LemmaInput.vue';
Expand Down Expand Up @@ -176,15 +176,15 @@ export default {
<span v-html="error" />
</error-message>
<div>
<wikit-button
<cdx-button
class="form-button-submit"
type="progressive"
variant="primary"
native-type="submit"
action="progressive"
weight="primary"
type="submit"
:disabled="submitting"
>
{{ submitButtonText }}
</wikit-button>
</cdx-button>
</div>
</form>
</template>
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/NewLexemeForm.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ describe( 'NewLexemeForm', () => {

await wrapper.trigger( 'submit' );

const submitButton = wrapper.find( '.wikit-Button' );
const submitButton = wrapper.find( '.cdx-button' );
expect( submitButton.attributes( 'disabled' ) ).toBe( '' );
expect( submitButton.text() ).toBe( 'Creating Lexeme...' );

Expand Down

0 comments on commit 8c35b7f

Please sign in to comment.