Skip to content

Commit 97f0baa

Browse files
committed
change color of remove icon on supported nips
1 parent fe72245 commit 97f0baa

File tree

2 files changed

+48
-45
lines changed

2 files changed

+48
-45
lines changed

src/components/settings/RelayInfoSettings.tsx

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ const RelayInfoSettings: React.FC = () => {
3232
updateSettings(changedValues);
3333
};
3434

35-
const onUploadIcon = (url: string) => {
36-
// use as onUploadIcon prop in Upload Component
37-
setImage(url);
38-
};
35+
// const onUploadIcon = (url: string) => {
36+
// // use as onUploadIcon prop in Upload Component
37+
// setImage(url);
38+
// };
3939

4040
// Common NIPs that relays might support
4141
const nipOptions = [
@@ -196,47 +196,47 @@ const RelayInfoSettings: React.FC = () => {
196196
>
197197
<S.InputField placeholder="1.0.0" />
198198
</Form.Item>
199-
200-
<Form.Item
201-
name="relaysupportednips"
202-
label={
203-
<span>
204-
Supported NIPs&nbsp;
205-
<Tooltip title="Nostr Implementation Possibilities (NIPs) supported by this relay">
206-
<QuestionCircleOutlined />
207-
</Tooltip>
208-
</span>
209-
}
210-
>
211-
<Select
212-
mode="tags"
213-
placeholder="Select or type custom NIP numbers (e.g. 1, 42, 999)"
214-
style={{ width: '100%' }}
215-
tokenSeparators={[',', ' ']}
216-
filterOption={(input, option) => {
217-
if (!option?.children) return false;
218-
return option.children.toString().toLowerCase().includes(input.toLowerCase());
219-
}}
220-
onChange={(values: (string | number)[]) => {
221-
// Convert all values to numbers, filtering out invalid ones
222-
const numberValues = values
223-
.map((val: string | number) => {
224-
const num = Number(val);
225-
return isNaN(num) ? null : num;
226-
})
227-
.filter((val: number | null): val is number => val !== null);
228-
229-
// Update the form field with number values
230-
form.setFieldsValue({ relaysupportednips: numberValues });
231-
}}
199+
<S.StyledOption>
200+
<Form.Item
201+
name="relaysupportednips"
202+
label={
203+
<span>
204+
Supported NIPs&nbsp;
205+
<Tooltip title="Nostr Implementation Possibilities (NIPs) supported by this relay">
206+
<QuestionCircleOutlined />
207+
</Tooltip>
208+
</span>
209+
}
232210
>
233-
{nipOptions.map((option) => (
234-
<Option key={option.value} value={option.value}>
235-
{option.label}
236-
</Option>
237-
))}
238-
</Select>
239-
</Form.Item>
211+
<Select
212+
mode="tags"
213+
placeholder="Select or type custom NIP numbers (e.g. 1, 42, 999)"
214+
style={{ width: '100%' }}
215+
tokenSeparators={[',', ' ']}
216+
filterOption={(input, option) => {
217+
if (!option?.children) return false;
218+
return option.children.toString().toLowerCase().includes(input.toLowerCase());
219+
}}
220+
onChange={(values: (string | number)[]) => {
221+
// Convert all values to numbers, filtering out invalid ones
222+
const numberValues = values
223+
.map((val: string | number) => {
224+
const num = Number(val);
225+
return isNaN(num) ? null : num;
226+
})
227+
.filter((val: number | null): val is number => val !== null);
228+
// Update the form field with number values
229+
form.setFieldsValue({ relaysupportednips: numberValues });
230+
}}
231+
>
232+
{nipOptions.map((option) => (
233+
<Option key={option.value} value={option.value}>
234+
{option.label}
235+
</Option>
236+
))}
237+
</Select>
238+
</Form.Item>
239+
</S.StyledOption>
240240

241241
<Form.Item>
242242
<p

src/components/settings/Settings.styles.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import styled from 'styled-components';
22
import { Input, InputNumber, Select, Button } from 'antd';
3-
43
export const InputField = styled(Input)`
54
border-radius: 7px !important;
65
padding: 0.7rem !important;
@@ -86,3 +85,7 @@ export const UploadedImageWrapper = styled.div`
8685
display: block;
8786
}
8887
`;
88+
export const StyledOption = styled.div`
89+
.ant-select-selection-item-remove{
90+
color: var(--text-light-color);
91+
`;

0 commit comments

Comments
 (0)