Git Product home page Git Product logo

baxe-test's Introduction

🪙Baxe Test

logo

React Native project with Typescript

Libraries & Frameworks

  • ⛓ Routing: React Navigation For simplicity a map of objects to iterate within createBottomTabNavigation :
export type Route = {
  name: string;
  component: React.ComponentType<any>;
  iconName: {
    focused: string;
    unfocused: string;
  };
};
  • ⚙ ️State management: React-query would be the chosen tool but due to limited time, only mock data generated with FakerJS , 🚨however faker.avatar() was not properly working

  • 🖌 Styling: Consistencss Based in Tailwind for web, this library helps to ensure consistent UI Guidelines such as BASE_PIXEL=4 to perform all the spacings and sizes in the app. Also I've created some helper functions such as eColor() and sizes such as:

export const imgSize = {
  card: [C.h50, C.w46],
  big: [C.h13, C.w13],
  md: [C.h10, C.w10],
  sm: [C.h8, C.w8],
};

Time constrains made me skip the part of applying properly a gradient mask to text, however this could be thanks to a SVG Mask as follows:

//Absolute Container 
<Svg width = "100%"
height = "100%" >
<Defs>
  <LinearGradient id = "Gradient"
x1 = "0"
y1 = "0"
x2 = "1"
y2 = "0" >
<Stop offset = "0"
stopColor = { gradient[0] }
/>
< Stop
offset = "1"
stopColor = { gradient[1] }
/>
< /LinearGradient>
< /Defs>
< Text
id = "Text"
x = "50%"
fill = "url(#Gradient)"
fillRule = "evenodd"
y = {`${0.75 * lineHeight}`
}
fontFamily = { fontFamily }
fontWeight = { fontWeight }
fontSize = { fontSize }
textAnchor = { textAnchor[alignment] } >
  { text }
  < /Text>
  < /Svg>

In order to achieve the following gradient

img_5.png

  • 🧪 Unit tests: user creation
  test('should create a user with default values', () => {
  const fakeObj = {
    avatar: 'http://fake-image-url.com',
    name: 'John',
  };
  const user: UserType = createPartialUser(fakeObj);

  expect(user.avatar).toBe('http://fake-image-url.com');
  expect(user.name).toBe('John');
});

img.png

  • 🎨 Figma Inspiration: Zeplin See comparison below:

img_4.png img_3.png

Install

ios:

cd ios && pod install
yarn start
yarn pods-m1
react-native run-ios

baxe-test's People

Contributors

gsietsetb avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.