Skip to content

Instantly share code, notes, and snippets.

@thunderrun
Last active December 4, 2020 05:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thunderrun/7c139a7fda44895767dd7de40d8f2b5f to your computer and use it in GitHub Desktop.
Save thunderrun/7c139a7fda44895767dd7de40d8f2b5f to your computer and use it in GitHub Desktop.
Seperate Ant Design Radio Buttons
<template>
<a-radio-group
class="radio-buttons"
button-style="outline"
>
<a-radio-button value="a">
Hangzhou
</a-radio-button>
<a-radio-button value="b">
Shanghai
</a-radio-button>
<a-radio-button value="c">
Beijing
</a-radio-button>
<a-radio-button value="d">
Chengdu
</a-radio-button>
</a-radio-group>
</template>
<style scoped>
.radio-buttons >>> .ant-radio-button-wrapper {
border-radius: 4px;
outline: none;
margin-right: 10px;
margin-bottom: 5px;
}
.radio-buttons >>> .ant-radio-button-wrapper:not(.ant-radio-button-wrapper-checked) {
border-left: 1px solid #d9d9d9;
}
.radio-buttons >>> .ant-radio-button-wrapper:not(:first-child)::before {
content: none;
}
.radio-buttons >>> .ant-radio-button-wrapper:last-child {
margin-right: 0;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment