Skip to content

Commit f864be0

Browse files
committed
Move to rawColors in EditRule page
1 parent 820e2e6 commit f864be0

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/ui/pages/EditRule.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { findByProps } from "@vendetta/metro";
2-
import { constants as Constants, clipboard as Clipboard, NavigationNative } from "@vendetta/metro/common";
1+
import { stylesheet as StyleSheet, clipboard as Clipboard, NavigationNative } from "@vendetta/metro/common";
32
import { storage } from "@vendetta/plugin";
43
import { useProxy } from "@vendetta/storage";
4+
import { rawColors } from "@vendetta/ui";
55
import { getAssetIDByName } from "@vendetta/ui/assets";
66
import { Forms, General } from "@vendetta/ui/components";
77
import { showToast } from "@vendetta/ui/toasts";
@@ -13,8 +13,11 @@ const { FormSection, FormInput, FormDivider, FormSwitchRow, FormRow, FormLabel }
1313

1414
const MessageCopy = getAssetIDByName("ic_message_copy");
1515

16-
const colorModule = findByProps("SemanticColorsByThemeTable");
17-
const colors = (colorModule?.RawColor ?? Constants.Colors);
16+
const styles = StyleSheet.createThemedStyleSheet({
17+
delete: {
18+
color: rawColors.RED_400
19+
}
20+
})
1821

1922
export default function EditRule({ ruleIndex }) {
2023
let rule = storage.rules[ruleIndex] as Rule;
@@ -80,7 +83,7 @@ export default function EditRule({ ruleIndex }) {
8083
<FormRow label="Copy code block to Clipboard" onPress={copyCodeBlockCallback} />
8184
</FormSection>
8285
<FormSection>
83-
<FormRow label={<FormLabel text="Delete Rule" style={{color: colors.STATUS_RED_500}} />} onPress={deleteRuleCallback} />
86+
<FormRow label={<FormLabel text="Delete Rule" style={styles.delete} />} onPress={deleteRuleCallback} />
8487
</FormSection>
8588
</ScrollView>
8689
);

0 commit comments

Comments
 (0)