Skip to content

Commit

Permalink
POC: Use Codex in NewLexemeForm
Browse files Browse the repository at this point in the history
Using the Button component from Codex instead of Wikit is
straightforward – we just need to rename a few props.

Using the variables is a bit more involved. Not only do we need
replacement variables from Codex that aren’t always clear, but the
small-text mixin used for the copyright notice also relies on the Wikit
variables. So for now, this change just keeps importing the Wikit
variables and lets Codex override them wherever they both use the same
name.

Bug: T369505
  • Loading branch information
lucaswerkmeister committed Sep 19, 2024
1 parent 7ea087a commit 6a7a13f
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 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,21 +176,22 @@ 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>

<style scoped lang="scss">
@import '@wmde/wikit-tokens/variables';
@import '@wmde/wikit-tokens/variables'; // TODO remove
@import '@wikimedia/codex-design-tokens/theme-wikimedia-ui';
@import '@wmde/wikit-vue-components/src/styles/mixins/Typography';
.wbl-snl-form {
Expand All @@ -203,9 +204,9 @@ export default {
// Border
border-style: $border-style-base;
border-width: $border-width-thin;
border-width: $border-width-base;
border-radius: $border-radius-base;
border-color: $border-color-base-subtle;
border-color: $border-color-muted;
}
.wbl-snl-copyright {
Expand Down

0 comments on commit 6a7a13f

Please sign in to comment.