How to create a new ____ ?
List of elements in the app which might be needed to be added more of later on, write here only if there are few steps, else create a new page for it.
Auth method
- create a new script in
src\core\auth
and create an object withAuthMethod
type - inside
AuthMethods
insrc\core\auth\utils.tsx
add a key (should be the same supbase expectsprovider
provider to be) for your auth method, and its value should be theAuthMethod
type object you created. - create a button in
src\screens\login\index.tsx
along side the other auth buttons we have right now, callsignIn
function with your key in onPress
Tab
- create a new key/value in TabsInfo, you will need an icon, a screen or navigator component to show, and a label for tab
- add the screen component you want to show in TabType in
src\screens
or Navigator component insrc\navigation
New Icons
- duplicate a file in
src\ui\icons
and rename the file and component accordingly. - go to svg repo, search and select the icon you want to use.
- select the icon you want and click on the icon to open it's page.
- Click on edit vector, edit the icon as per your liking and copy svg.
- Open svgr playground and paste your svg xml here.
- Make sure to tick on react native and typescript from the left bar.
- copy the svg from the right window and replace it with the existing svg component in your created file. Do remember to copy all the dependencies of react native svg as well.
- Modify the component as needed.
Make a new icon / make more edits to existing icons.
- Download and install inkscape.
- Download the icon from step 2 of new icons as svg file.
- Create a new document of inkscape and import svg file, edit the file.
- Export the file as svg.
- Open the svg file, copy the xml and continue from step 5 of new icons.
class Yo{
function hi(){
console.log("yo");
}
|