Skip to content

Commit ccb973e

Browse files
authored
Nicer UI for allowed command pills (RooVetGit#37)
1 parent adc438f commit ccb973e

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

webview-ui/src/components/settings/SettingsView.tsx

+21-2
Original file line numberDiff line numberDiff line change
@@ -237,17 +237,36 @@ const SettingsView = ({ onDone }: SettingsViewProps) => {
237237
</VSCodeButton>
238238
</div>
239239

240-
<div style={{ marginTop: '10px' }}>
240+
<div style={{
241+
marginTop: '10px',
242+
display: 'flex',
243+
flexWrap: 'wrap',
244+
gap: '5px'
245+
}}>
241246
{(allowedCommands ?? []).map((cmd, index) => (
242247
<div key={index} style={{
243248
display: 'flex',
244249
alignItems: 'center',
245250
gap: '5px',
246-
marginBottom: '5px'
251+
backgroundColor: 'var(--vscode-button-secondaryBackground)',
252+
padding: '2px 6px',
253+
borderRadius: '4px',
254+
border: '1px solid var(--vscode-button-secondaryBorder)',
255+
height: '24px'
247256
}}>
248257
<span>{cmd}</span>
249258
<VSCodeButton
250259
appearance="icon"
260+
style={{
261+
padding: 0,
262+
margin: 0,
263+
height: '20px',
264+
width: '20px',
265+
minWidth: '20px',
266+
display: 'flex',
267+
alignItems: 'center',
268+
justifyContent: 'center'
269+
}}
251270
onClick={() => {
252271
const newCommands = (allowedCommands ?? []).filter((_, i) => i !== index)
253272
setAllowedCommands(newCommands)

0 commit comments

Comments
 (0)