Skip to content

Commit 938b609

Browse files
authored
feat: use flag value to display sdk message (#7458)
1 parent d8cd275 commit 938b609

1 file changed

Lines changed: 25 additions & 17 deletions

File tree

frontend/web/components/modals/CreateSegmentRulesTabForm.tsx

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -202,27 +202,35 @@ const CreateSegmentRulesTabForm: React.FC<CreateSegmentRulesTabFormProps> = ({
202202
{!readOnly &&
203203
setTopLevelRuleType &&
204204
Utils.getFlagsmithHasFeature('segment_any_rule_type') ? (
205-
<Row className='mb-3 align-items-center gap-2'>
206-
<label className='control-label mb-0'>Include users when</label>
207-
<InlinePillToggle
208-
data-test='top-level-rule-type'
209-
size='medium'
210-
options={[
211-
{ label: 'ALL', value: 'ALL' },
212-
{ label: 'ANY', value: 'ANY' },
213-
]}
214-
value={topLevelRuleType}
215-
onChange={setTopLevelRuleType}
216-
/>
217-
<label className='control-label mb-0'>
218-
of the following rules apply:
219-
</label>
220-
</Row>
205+
<>
206+
<Row className='mb-2 align-items-center gap-2'>
207+
<label className='control-label mb-0'>Include users when</label>
208+
<InlinePillToggle
209+
data-test='top-level-rule-type'
210+
size='medium'
211+
options={[
212+
{ label: 'ALL', value: 'ALL' },
213+
{ label: 'ANY', value: 'ANY' },
214+
]}
215+
value={topLevelRuleType}
216+
onChange={setTopLevelRuleType}
217+
/>
218+
<label className='control-label mb-0'>
219+
of the following rules apply
220+
</label>
221+
</Row>
222+
{topLevelRuleType === 'ANY' &&
223+
Utils.getFlagsmithValue('segment_any_rule_type') && (
224+
<div className='fs-small fst-italic text-muted mb-3'>
225+
{Utils.getFlagsmithValue('segment_any_rule_type')}
226+
</div>
227+
)}
228+
</>
221229
) : (
222230
<Flex className='mb-3'>
223231
<label className='cols-sm-2 control-label mb-1'>
224232
Include users when {topLevelRuleType === 'ANY' ? 'any' : 'all'} of
225-
the following rules apply:
233+
the following rules apply
226234
</label>
227235
</Flex>
228236
)}

0 commit comments

Comments
 (0)